{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Direct Transcrition Methods\n",
    "(Working in Progress) This tutorial follows optimization, and use direct transcription method to solve trajectory optimization problem.\n",
    "\n",
    "The Nonlinear Programming Problem(NLP) is solve with help of casadi and IPOPT. "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [],
   "source": [
    "import mujoco\n",
    "import mediapy as media\n",
    "from casadi import *"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Cartpole dynamics"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<table class=\"show_videos\" style=\"border-spacing:0px;\"><tr><td style=\"padding:1px;\"><video controls width=\"320\" height=\"240\" style=\"object-fit:cover;\" loop autoplay muted>\n",
       "      <source src=\"data:video/mp4;base64,AAAAIGZ0eXBpc29tAAACAGlzb21pc28yYXZjMW1wNDEAAAAIZnJlZQAASu9tZGF0AAACfwYF//973EXpvebZSLeWLNgg2SPu73gyNjQgLSBjb3JlIDE2MyByMzA2MCA1ZGI2YWE2IC0gSC4yNjQvTVBFRy00IEFWQyBjb2RlYyAtIENvcHlsZWZ0IDIwMDMtMjAyMSAtIGh0dHA6Ly93d3cudmlkZW9sYW4ub3JnL3gyNjQuaHRtbCAtIG9wdGlvbnM6IGNhYmFjPTEgcmVmPTMgZGVibG9jaz0xOjA6MCBhbmFseXNlPTB4MzoweDExMyBtZT1oZXggc3VibWU9NyBwc3k9MSBwc3lfcmQ9MS4wMDowLjAwIG1peGVkX3JlZj0xIG1lX3JhbmdlPTE2IGNocm9tYV9tZT0xIHRyZWxsaXM9MSA4eDhkY3Q9MSBjcW09MCBkZWFkem9uZT0yMSwxMSBmYXN0X3Bza2lwPTEgY2hyb21hX3FwX29mZnNldD0tMiB0aHJlYWRzPTcgbG9va2FoZWFkX3RocmVhZHM9MSBzbGljZWRfdGhyZWFkcz0wIG5y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A6AAAAMQAAAB4AAACZAAAAVQAAAEIAAAAvAAAAywAAAHUAAABAAAAASAAAAMsAAABzAAAAPgAAAEgAAACMAAAA0AAAAFAAAABLAAAA+QAAAH0AAABNAAAAQgAAAPsAAAB3AAAATQAAAGwAAAEbAAAAbgAAAGkAAAF/AAAAqwAAAHoAAACHAAABUQAAAJ4AAACEAAABAwAAAOYAAADxAAAA5QAAAMkAAACwAAABCwAAAPsAAAD6AAAAtwAAAJ4AAAB1AAAAtgAAAJsAAABRAAAAWAAAAJUAAABRAAAARwAAAIoAAADWAAAAZAAAAGIAAAEGAAAAnQAAAHgAAABfAAAAlwAAAFMAAACiAAAAXQAAAEsAAABbAAAArQAAAEwAAABRAAAASgAAAM4AAAB0AAAAcwAAAHEAAADQAAAAmgAAAFUAAABPAAAAkgAAAF4AAABGAAAAQAAAAG0AAABEAAAAMAAAAJ8AAABPAAAAOQAAADwAAAChAAAAQwAAAE8AAABGAAAAiAAAAF0AAABFAAAALwAAAEgAAABLAAAAKAAAACEAAACHAAAAWwAAADQAAAA9AAAAjAAAAEUAAABCAAAAOQAAAFYAAAAxAAAAOAAAAGYAAABHAAAAKwAAACsAAABwAAAAPQAAADgAAAA1AAAANAAAAFEAAAA5AAAAKwAAAB8AAAAWAAAAaQAAACQAAAAbAAAAIgAAAFEAAAA4AAAAHgAAABEAAABtAAAARAAAACsAAAAqAAAAXAAAAEQAAAAdAAAAHgAAAEoAAAAbAAAAFHN0Y28AAAAAAAAAAQAAADAAAABidWR0YQAAAFptZXRhAAAAAAAAACFoZGxyAAAAAAAAAABtZGlyYXBwbAAAAAAAAAAAAAAAAC1pbHN0AAAAJal0b28AAAAdZGF0YQAAAAEAAAAATGF2ZjU4Ljc2LjEwMA==\" type=\"video/mp4\"/>\n",
       "      This browser does not support the video tag.\n",
       "      </video></td></tr></table>"
      ],
      "text/plain": [
       "<IPython.core.display.HTML object>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "xml = \"\"\"\"\n",
    "<mujoco model=\"inverted pendulum\">\n",
    "  <compiler inertiafromgeom=\"true\"/>\n",
    "  <default>\n",
    "    <joint armature=\"0\" damping=\"1\" limited=\"true\"/>\n",
    "    <geom contype=\"0\" friction=\"1 0.1 0.1\" rgba=\"0.4 0.33 0.26 1.0\"/>\n",
    "    <tendon/>\n",
    "    <motor ctrlrange=\"-3 3\"/>\n",
    "  </default>\n",
    "  <option gravity=\"0 0 -9.81\" timestep=\"0.02\" />\n",
    "  <custom>\n",
    "    <!-- brax custom params -->\n",
    "    <numeric data=\"10000\" name=\"constraint_stiffness\"/>\n",
    "    <numeric data=\"10000\" name=\"constraint_limit_stiffness\"/>\n",
    "    <numeric data=\"0\" name=\"spring_mass_scale\"/>\n",
    "    <numeric data=\"1\" name=\"spring_inertia_scale\"/>\n",
    "    <numeric data=\"5\" name=\"solver_maxls\"/>\n",
    "  </custom>\n",
    "  <size nstack=\"3000\"/>\n",
    "  <worldbody>\n",
    "    <light diffuse=\"1 1 1\" pos=\"0 0 3\" dir=\"0 0 -1\"/>\n",
    "    <!-- geom name=\"ground\" type=\"plane\" pos=\"0 0 0\" / -->\n",
    "    <geom name=\"rail\" pos=\"0 0 0\" quat=\"0.707 0 0.707 0\" size=\"0.02 1\" type=\"capsule\" rgba=\"1 1 1 1\"/>\n",
    "    <body name=\"cart\" pos=\"0 0 0\">\n",
    "      <joint axis=\"1 0 0\" limited=\"false\" name=\"slider\" pos=\"0 0 0\" type=\"slide\"/>\n",
    "      <geom name=\"cart\" pos=\"0 0 0\" quat=\"0.707 0 0.707 0\" size=\"0.1 0.1\" type=\"capsule\"/>\n",
    "      <body name=\"pole\" pos=\"0 0 0\">\n",
    "        <joint axis=\"0 1 0\" name=\"hinge\" pos=\"0 0 0\" limited=\"false\" type=\"hinge\"/>\n",
    "        <geom fromto=\"0 0 0 0.001 0 0.6\" name=\"cpole\" size=\"0.049 0.3\" type=\"capsule\"/>\n",
    "        <!--                 <body name=\"pole2\" pos=\"0.001 0 0.6\"><joint name=\"hinge2\" type=\"hinge\" pos=\"0 0 0\" axis=\"0 1 0\"/><geom name=\"cpole2\" type=\"capsule\" fromto=\"0 0 0 0 0 0.6\" size=\"0.05 0.3\" rgba=\"0.7 0 0.7 1\"/><site name=\"tip2\" pos=\"0 0 .6\"/></body>-->\n",
    "      </body>\n",
    "    </body>\n",
    "  </worldbody>\n",
    "  <actuator>\n",
    "    <motor ctrllimited=\"true\" ctrlrange=\"-3 3\" gear=\"100\" joint=\"slider\" name=\"slide\"/>\n",
    "  </actuator>\n",
    "</mujoco>\n",
    "\"\"\"\n",
    "model = mujoco.MjModel.from_xml_string(xml)\n",
    "data = mujoco.MjData(model)\n",
    "renderer = mujoco.Renderer(model)\n",
    "\n",
    "duration = 3.8  # (seconds)\n",
    "framerate = 60  # (Hz)\n",
    "\n",
    "# Simulate and display video.\n",
    "frames = []\n",
    "mujoco.mj_resetData(model, data)  # Reset state and time.\n",
    "while data.time < duration:\n",
    "    mujoco.mj_step(model, data)\n",
    "    if len(frames) < data.time * framerate:\n",
    "        renderer.update_scene(data)\n",
    "        pixels = renderer.render()\n",
    "        frames.append(pixels)\n",
    "media.show_video(frames, fps=framerate)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Casadi Wrap for mujoco dynamics"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {},
   "outputs": [],
   "source": [
    "class CasadiMujocoWrap(Callback):\n",
    "    def __init__(self, name, opts={}):\n",
    "        Callback.__init__(self)\n",
    "        self.construct(name, opts)\n",
    "\n",
    "    # Number of inputs and outputs\n",
    "    def get_n_in(self): return 2\n",
    "    def get_n_out(self): return 1\n",
    "\n",
    "    def get_sparsity_in(self,i):\n",
    "        if i == 0:\n",
    "            return Sparsity.dense(4,1)\n",
    "        elif i == 1:\n",
    "            return Sparsity.dense(1,1)\n",
    "        else:\n",
    "            raise ValueError(\"wrong args index\")\n",
    "\n",
    "    def get_sparsity_out(self,i):\n",
    "        return Sparsity.dense(4,1)\n",
    "\n",
    "    # Evaluate numerically\n",
    "    def eval(self, arg):\n",
    "        x = arg[0].full().flatten()\n",
    "        u = arg[1].full().flatten()\n",
    "        qpos, qvel = np.split(x, 2)\n",
    "        data.qpos = qpos\n",
    "        data.qvel = qvel\n",
    "        data.ctrl = u\n",
    "        mujoco.mj_step(model, data)\n",
    "        x_next = np.hstack([data.qpos, data.qvel])\n",
    "        return [DM(x_next)]\n",
    "\n",
    "mujoco_dyanmics = CasadiMujocoWrap('f', {\"enable_fd\":True})"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<table class=\"show_videos\" style=\"border-spacing:0px;\"><tr><td style=\"padding:1px;\"><video controls width=\"320\" height=\"240\" style=\"object-fit:cover;\" loop autoplay muted>\n",
       "      <source src=\"data:video/mp4;base64,AAAAIGZ0eXBpc29tAAACAGlzb21pc28yYXZjMW1wNDEAAAAIZnJlZQAAKK5tZGF0AAACfwYF//973EXpvebZSLeWLNgg2SPu73gyNjQgLSBjb3JlIDE2MyByMzA2MCA1ZGI2YWE2IC0gSC4yNjQvTVBFRy00IEFWQyBjb2RlYyAtIENvcHlsZWZ0IDIwMDMtMjAyMSAtIGh0dHA6Ly93d3cudmlkZW9sYW4ub3JnL3gyNjQuaHRtbCAtIG9wdGlvbnM6IGNhYmFjPTEgcmVmPTMgZGVibG9jaz0xOjA6MCBhbmFseXNlPTB4MzoweDExMyBtZT1oZXggc3VibWU9NyBwc3k9MSBwc3lfcmQ9MS4wMDowLjAwIG1peGVkX3JlZj0xIG1lX3JhbmdlPTE2IGNocm9tYV9tZT0xIHRyZWxsaXM9MSA4eDhkY3Q9MSBjcW09MCBkZWFkem9uZT0yMSwxMSBmYXN0X3Bza2lwPTEgY2hyb21hX3FwX29mZnNldD0tMiB0aHJlYWRzPTcgbG9va2FoZWFkX3RocmVhZHM9MSBzbGljZWRfdGhyZWFkcz0wIG5yPTAgZG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AAHWRhdGEAAAABAAAAAExhdmY1OC43Ni4xMDA=\" type=\"video/mp4\"/>\n",
       "      This browser does not support the video tag.\n",
       "      </video></td></tr></table>"
      ],
      "text/plain": [
       "<IPython.core.display.HTML object>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "mujoco.mj_resetData(model, data) \n",
    "\n",
    "state = np.hstack([data.qpos, data.qvel])\n",
    "u = np.array([1.0])\n",
    "frames = []\n",
    "while data.time < duration:\n",
    "    state = mujoco_dyanmics(state, u).full().flatten()\n",
    "    data.qpos = state[:2]\n",
    "    data.qvel = state[2:]\n",
    "    mujoco.mj_forward(model, data)\n",
    "    if len(frames) < data.time * framerate:\n",
    "        renderer.update_scene(data)\n",
    "        pixels = renderer.render()\n",
    "        frames.append(pixels)\n",
    "media.show_video(frames, fps=framerate)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Construct NLP and solve with IPOPT"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "\n",
      "******************************************************************************\n",
      "This program contains Ipopt, a library for large-scale nonlinear optimization.\n",
      " Ipopt is released as open source code under the Eclipse Public License (EPL).\n",
      "         For more information visit https://github.com/coin-or/Ipopt\n",
      "******************************************************************************\n",
      "\n",
      "This is Ipopt version 3.14.11, running with linear solver MUMPS 5.4.1.\n",
      "\n",
      "Number of nonzeros in equality constraint Jacobian...:     1208\n",
      "Number of nonzeros in inequality constraint Jacobian.:      100\n",
      "Number of nonzeros in Lagrangian Hessian.............:      750\n",
      "\n",
      "Total number of variables............................:      254\n",
      "                     variables with only lower bounds:        0\n",
      "                variables with lower and upper bounds:        0\n",
      "                     variables with only upper bounds:        0\n",
      "Total number of equality constraints.................:      208\n",
      "Total number of inequality constraints...............:      100\n",
      "        inequality constraints with only lower bounds:       50\n",
      "   inequality constraints with lower and upper bounds:        0\n",
      "        inequality constraints with only upper bounds:       50\n",
      "\n",
      "iter    objective    inf_pr   inf_du lg(mu)  ||d||  lg(rg) alpha_du alpha_pr  ls\n",
      "   0  0.0000000e+00 4.47e-01 0.00e+00  -1.0 0.00e+00    -  0.00e+00 0.00e+00   0\n",
      "   1  0.0000000e+00 3.93e-01 5.60e+00  -1.0 1.82e+01    -  1.41e-01 1.63e-01h  1\n",
      "   2  0.0000000e+00 3.81e-01 7.04e+00  -1.0 3.79e+01    -  6.84e-02 7.27e-02h  1\n",
      "   3  0.0000000e+00 1.88e-01 3.15e+00  -1.0 7.56e+00    -  6.64e-01 4.49e-01h  1\n",
      "   4  0.0000000e+00 1.14e-01 1.64e+00  -1.0 4.62e+00    -  4.50e-01 5.02e-01h  1\n",
      "   5  0.0000000e+00 7.96e-02 9.31e-01  -1.0 5.32e+00    -  4.74e-01 4.08e-01h  1\n",
      "   6  0.0000000e+00 8.21e-02 6.01e-01  -1.7 3.70e+00    -  4.04e-01 7.19e-01h  1\n",
      "   7  0.0000000e+00 7.45e-02 4.83e-01  -1.7 4.58e+00    -  8.37e-01 1.93e-01h  1\n",
      "   8  0.0000000e+00 3.14e-02 6.80e-01  -1.7 2.12e+00    -  3.80e-01 8.46e-01h  1\n",
      "   9  0.0000000e+00 3.76e-02 7.74e-01  -1.7 2.45e+00    -  1.00e+00 1.00e+00h  1\n",
      "iter    objective    inf_pr   inf_du lg(mu)  ||d||  lg(rg) alpha_du alpha_pr  ls\n",
      "  10  0.0000000e+00 5.39e-05 8.52e-03  -1.7 1.31e-01    -  1.00e+00 1.00e+00h  1\n",
      "  11  0.0000000e+00 7.27e-09 9.33e-04  -3.8 7.24e-04    -  1.00e+00 1.00e+00h  1\n",
      "  12  0.0000000e+00 3.67e-10 3.46e-06  -5.7 3.38e-04    -  1.00e+00 1.00e+00h  1\n",
      "  13  0.0000000e+00 5.10e-12 4.42e-09  -8.6 3.89e-05    -  1.00e+00 1.00e+00h  1\n",
      "\n",
      "Number of Iterations....: 13\n",
      "\n",
      "                                   (scaled)                 (unscaled)\n",
      "Objective...............:   0.0000000000000000e+00    0.0000000000000000e+00\n",
      "Dual infeasibility......:   4.4160722910113454e-09    4.4160722910113454e-09\n",
      "Constraint violation....:   5.1045279114703135e-12    5.1045279114703135e-12\n",
      "Variable bound violation:   0.0000000000000000e+00    0.0000000000000000e+00\n",
      "Complementarity.........:   2.5827127346525179e-09    2.5827127346525179e-09\n",
      "Overall NLP error.......:   4.4160722910113454e-09    4.4160722910113454e-09\n",
      "\n",
      "\n",
      "Number of objective function evaluations             = 14\n",
      "Number of objective gradient evaluations             = 14\n",
      "Number of equality constraint evaluations            = 14\n",
      "Number of inequality constraint evaluations          = 14\n",
      "Number of equality constraint Jacobian evaluations   = 14\n",
      "Number of inequality constraint Jacobian evaluations = 14\n",
      "Number of Lagrangian Hessian evaluations             = 13\n",
      "Total seconds in IPOPT                               = 11.181\n",
      "\n",
      "EXIT: Optimal Solution Found.\n",
      "      solver  :   t_proc      (avg)   t_wall      (avg)    n_eval\n",
      "       nlp_f  |  35.00us (  2.50us)  24.73us (  1.77us)        14\n",
      "       nlp_g  |  32.23ms (  2.30ms)  31.32ms (  2.24ms)        14\n",
      "  nlp_grad_f  | 123.00us (  8.20us)  29.64us (  1.98us)        15\n",
      "  nlp_hess_l  |  10.52 s (809.30ms)  10.52 s (809.39ms)        13\n",
      "   nlp_jac_g  |   1.26 s ( 84.13ms) 608.59ms ( 40.57ms)        15\n",
      "       total  |  11.85 s ( 11.85 s)  11.18 s ( 11.18 s)         1\n"
     ]
    }
   ],
   "source": [
    "T = 50\n",
    "\n",
    "prob = Opti()\n",
    "x = prob.variable(4, T+1)\n",
    "u = prob.variable(1, T)\n",
    "\n",
    "# initial condition\n",
    "x0 = np.array([0, np.pi, 0, 0])\n",
    "# target\n",
    "x_target = np.array([0, 0, 0, 0])\n",
    "# initial condition constraints\n",
    "prob.subject_to(x[:, 0] == x0)\n",
    "# terminal condition\n",
    "prob.subject_to(x[:, -1] == x_target)\n",
    "for i in range(T):\n",
    "    # dynamics constraints\n",
    "    prob.subject_to(x[:, i+1] == mujoco_dyanmics(x[:, i], u[:, i]))\n",
    "# control limit\n",
    "prob.subject_to([u>=-3, u<=3])\n",
    "# just feasible problem, no objective\n",
    "prob.minimize(0)\n",
    "\n",
    "# set initial guess (it is crtical to obtain the solution in current NLP formulation)\n",
    "x_init = np.swapaxes(np.linspace(x0, x_target, T+1), 0, 1)\n",
    "prob.set_initial(x, x_init)\n",
    "\n",
    "prob.solver(\"ipopt\")\n",
    "sol = prob.solve()\n",
    "traj_x = np.swapaxes(sol.value(x), 0, 1)\n",
    "traj_u = sol.value(u)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Test results"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<table class=\"show_videos\" style=\"border-spacing:0px;\"><tr><td style=\"padding:1px;\"><video controls width=\"320\" height=\"240\" style=\"object-fit:cover;\" loop autoplay muted>\n",
       "      <source src=\"data:video/mp4;base64,AAAAIGZ0eXBpc29tAAACAGlzb21pc28yYXZjMW1wNDEAAAAIZnJlZQAAJr5tZGF0AAACfwYF//973EXpvebZSLeWLNgg2SPu73gyNjQgLSBjb3JlIDE2MyByMzA2MCA1ZGI2YWE2IC0gSC4yNjQvTVBFRy00IEFWQyBjb2RlYyAtIENvcHlsZWZ0IDIwMDMtMjAyMSAtIGh0dHA6Ly93d3cudmlkZW9sYW4ub3JnL3gyNjQuaHRtbCAtIG9wdGlvbnM6IGNhYmFjPTEgcmVmPTMgZGVibG9jaz0xOjA6MCBhbmFseXNlPTB4MzoweDExMyBtZT1oZXggc3VibWU9NyBwc3k9MSBwc3lfcmQ9MS4wMDowLjAwIG1peGVkX3JlZj0xIG1lX3JhbmdlPTE2IGNocm9tYV9tZT0xIHRyZWxsaXM9MSA4eDhkY3Q9MSBjcW09MCBkZWFkem9uZT0yMSwxMSBmYXN0X3Bza2lwPTEgY2hyb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AAABAAADAAAAAAEAAAEAAAAAAQAAAwAAAAABAAABAAAAAAEAAAQAAAAAAgAAAQAAAAABAAACAAAAAAEAAAMAAAAAAQAAAQAAAAAcc3RzYwAAAAAAAAABAAAAAQAAADMAAAABAAAA4HN0c3oAAAAAAAAAAAAAADMAAAScAAAAhQAAAEwAAAAuAAAAPAAAAM4AAABiAAAARwAAAMIAAABRAAAA1QAAAG4AAAEZAAAAcAAAAG8AAABXAAAAuAAAAGoAAABeAAAAvwAAAIMAAABlAAAAXQAAALwAAABYAAAAVgAAAN4AAABwAAABLQAAAJQAAAD5AAAA7AAAAMIAAAD/AAABQgAAAS0AAAERAAAA8QAAAPAAAADZAAAA+gAAATEAAACfAAABVAAAAIkAAAFHAAAA2AAAAJkAAAC+AAAAswAAABYAAAAUc3RjbwAAAAAAAAABAAAAMAAAAGJ1ZHRhAAAAWm1ldGEAAAAAAAAAIWhkbHIAAAAAAAAAAG1kaXJhcHBsAAAAAAAAAAAAAAAALWlsc3QAAAAlqXRvbwAAAB1kYXRhAAAAAQAAAABMYXZmNTguNzYuMTAw\" type=\"video/mp4\"/>\n",
       "      This browser does not support the video tag.\n",
       "      </video></td></tr></table>"
      ],
      "text/plain": [
       "<IPython.core.display.HTML object>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "frames = []\n",
    "for state in traj_x:\n",
    "    data.qpos = state[:2]\n",
    "    data.qvel = state[2:]\n",
    "    mujoco.mj_forward(model, data)\n",
    "    renderer.update_scene(data)\n",
    "    pixels = renderer.render()\n",
    "    frames.append(pixels)\n",
    "media.show_video(frames, fps=1/0.02)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<table class=\"show_videos\" style=\"border-spacing:0px;\"><tr><td style=\"padding:1px;\"><video controls width=\"320\" height=\"240\" style=\"object-fit:cover;\" loop autoplay muted>\n",
       "      <source src=\"data:video/mp4;base64,AAAAIGZ0eX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gAAAAAFGJ0cnQAAAAAAAE1+AABNfgAAAAYc3R0cwAAAAAAAAABAAAAMgAAAQAAAAAUc3RzcwAAAAAAAAABAAAAAQAAAUhjdHRzAAAAAAAAACcAAAABAAACAAAAAAEAAAUAAAAAAQAAAgAAAAABAAAAAAAAAAEAAAEAAAAAAQAABAAAAAACAAABAAAAAAEAAAUAAAAAAQAAAgAAAAABAAAAAAAAAAEAAAEAAAAAAQAABQAAAAABAAACAAAAAAEAAAAAAAAAAQAAAQAAAAABAAAFAAAAAAEAAAIAAAAAAQAAAAAAAAABAAABAAAAAAEAAAUAAAAAAQAAAgAAAAABAAAAAAAAAAEAAAEAAAAAAQAABAAAAAACAAABAAAAAAEAAAMAAAAAAQAAAQAAAAABAAAEAAAAAAIAAAEAAAAACAAAAgAAAAABAAADAAAAAAEAAAEAAAAAAQAAAwAAAAABAAABAAAAAAEAAAQAAAAAAgAAAQAAAAABAAACAAAAAAEAAAMAAAAAAQAAAQAAAAAcc3RzYwAAAAAAAAABAAAAAQAAADIAAAABAAAA3HN0c3oAAAAAAAAAAAAAADIAAASrAAAAqgAAADgAAAA7AAAAWAAAAPIAAABXAAAAbwAAAQwAAABwAAAAcAAAAGIAAADvAAAAeAAAAEUAAABtAAAAvAAAAJcAAABdAAAAcAAAALUAAACVAAAAXwAAAF8AAAEDAAAAbQAAAHgAAAEkAAAAmgAAAPgAAADpAAAAwAAAAQIAAAE8AAABNQAAAQ8AAADsAAAA+gAAAN8AAAD4AAABLgAAAJwAAAFIAAAAiQAAAUcAAADNAAAAlwAAALcAAAC7AAAAGgAAABRzdGNvAAAAAAAAAAEAAAAwAAAAYnVkdGEAAABabWV0YQAAAAAAAAAhaGRscgAAAAAAAAAAbWRpcmFwcGwAAAAAAAAAAAAAAAAtaWxzdAAAACWpdG9vAAAAHWRhdGEAAAABAAAAAExhdmY1OC43Ni4xMDA=\" type=\"video/mp4\"/>\n",
       "      This browser does not support the video tag.\n",
       "      </video></td></tr></table>"
      ],
      "text/plain": [
       "<IPython.core.display.HTML object>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "mujoco.mj_resetData(model, data) \n",
    "state = x0\n",
    "frames = []\n",
    "for u in traj_u:\n",
    "    state = mujoco_dyanmics(state, u).full().flatten()\n",
    "    data.qpos = state[:2]\n",
    "    data.qvel = state[2:]\n",
    "    mujoco.mj_forward(model, data)\n",
    "    renderer.update_scene(data)\n",
    "    pixels = renderer.render()\n",
    "    frames.append(pixels)\n",
    "media.show_video(frames, fps=1/0.02)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## More NLPs"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "This is Ipopt version 3.14.11, running with linear solver MUMPS 5.4.1.\n",
      "\n",
      "Number of nonzeros in equality constraint Jacobian...:     1204\n",
      "Number of nonzeros in inequality constraint Jacobian.:      100\n",
      "Number of nonzeros in Lagrangian Hessian.............:      750\n",
      "\n",
      "Total number of variables............................:      254\n",
      "                     variables with only lower bounds:        0\n",
      "                variables with lower and upper bounds:        0\n",
      "                     variables with only upper bounds:        0\n",
      "Total number of equality constraints.................:      204\n",
      "Total number of inequality constraints...............:      100\n",
      "        inequality constraints with only lower bounds:       50\n",
      "   inequality constraints with lower and upper bounds:        0\n",
      "        inequality constraints with only upper bounds:       50\n",
      "\n",
      "iter    objective    inf_pr   inf_du lg(mu)  ||d||  lg(rg) alpha_du alpha_pr  ls\n",
      "   0  1.6946111e+02 4.47e-01 7.47e-01  -1.0 0.00e+00    -  0.00e+00 0.00e+00   0\n",
      "   1  1.3714217e+02 3.48e-01 2.99e+00  -1.0 9.55e+00    -  4.07e-01 6.75e-01f  1\n",
      "   2  1.3071212e+02 2.57e-01 2.31e+00  -1.0 4.83e+00    -  5.79e-01 2.67e-01f  1\n",
      "   3  1.3286540e+02 1.37e-01 1.38e+00  -1.0 3.81e+00    -  5.32e-01 4.44e-01h  1\n",
      "   4  1.3545877e+02 8.66e-02 1.22e+00  -1.0 5.70e+00    -  4.36e-01 3.67e-01h  1\n",
      "   5  1.4126960e+02 5.65e-02 2.81e+00  -1.0 2.88e+00    -  5.86e-01 7.74e-01h  1\n",
      "   6  1.4244119e+02 4.36e-02 2.91e+00  -1.0 7.17e+00    -  1.00e+00 2.27e-01h  1\n",
      "   7  1.4755524e+02 5.31e-02 1.18e+00  -1.0 1.40e+00    -  1.00e+00 1.00e+00h  1\n",
      "   8  1.4796721e+02 4.16e-03 3.99e-01  -1.0 4.34e-01    -  1.00e+00 1.00e+00h  1\n",
      "   9  1.4633699e+02 1.20e-02 9.98e-01  -1.7 5.36e-01    -  9.34e-01 1.00e+00f  1\n",
      "iter    objective    inf_pr   inf_du lg(mu)  ||d||  lg(rg) alpha_du alpha_pr  ls\n",
      "  10  1.4592598e+02 3.55e-03 1.34e-02  -1.7 4.64e-01    -  1.00e+00 1.00e+00h  1\n",
      "  11  1.4534612e+02 3.54e-03 1.36e-01  -3.8 3.50e-01    -  8.06e-01 1.00e+00f  1\n",
      "  12  1.4527055e+02 4.70e-04 1.92e+00  -3.8 2.26e-01    -  8.93e-01 1.00e+00h  1\n",
      "  13  1.4526541e+02 2.08e-05 1.41e+00  -3.8 9.02e-02    -  1.00e+00 1.00e+00h  1\n",
      "  14  1.4526493e+02 1.20e-06 1.60e+00  -3.8 4.29e-02    -  1.00e+00 1.00e+00h  1\n",
      "  15  1.4526489e+02 4.05e-07 1.48e+00  -3.8 8.98e-03    -  1.00e+00 1.00e+00h  1\n",
      "  16  1.4526489e+02 2.67e-08 2.86e+00  -3.8 1.83e-06   6.0 1.00e+00 1.00e+00h  1\n",
      "  17  1.4526489e+02 1.40e-08 1.06e+00  -3.8 1.84e-07   6.4 1.00e+00 1.00e+00h  1\n",
      "  18  1.4526490e+02 4.17e-07 2.07e+00  -3.8 4.21e-04    -  1.00e+00 1.00e+00h  1\n",
      "  19  1.4526490e+02 2.02e-07 2.85e+00  -3.8 4.60e-07   6.9 1.00e+00 5.00e-01h  2\n",
      "iter    objective    inf_pr   inf_du lg(mu)  ||d||  lg(rg) alpha_du alpha_pr  ls\n",
      "  20  1.4526486e+02 3.32e-07 1.64e+00  -3.8 7.09e-06    -  1.00e+00 1.00e+00h  1\n",
      "  21  1.4526483e+02 4.62e-07 1.89e+00  -3.8 2.33e-05    -  1.00e+00 1.00e+00h  1\n",
      "  22  1.4526488e+02 6.37e-07 1.82e+00  -3.8 2.72e-05    -  1.00e+00 1.00e+00h  1\n",
      "  23  1.4526484e+02 4.36e-07 1.07e+00  -3.8 4.71e-05    -  1.00e+00 5.00e-01h  2\n",
      "  24  1.4526501e+02 7.38e-11 1.72e+00  -3.8 7.38e-05    -  1.00e+00 1.00e+00H  1\n",
      "  25  1.4526473e+02 2.30e-07 1.99e+00  -3.8 1.54e-04    -  1.00e+00 1.00e+00f  1\n",
      "  26  1.4526489e+02 6.61e-07 1.50e+00  -3.8 8.38e-05    -  1.00e+00 1.00e+00h  1\n",
      "  27  1.4526483e+02 4.43e-07 1.69e+00  -3.8 2.93e-05    -  1.00e+00 1.00e+00h  1\n",
      "  28  1.4526485e+02 2.83e-12 1.10e+00  -3.8 9.05e-06    -  1.00e+00 1.00e+00H  1\n",
      "  29  1.4526484e+02 2.35e-07 1.01e+00  -3.8 6.08e-06    -  1.00e+00 1.00e+00f  1\n",
      "iter    objective    inf_pr   inf_du lg(mu)  ||d||  lg(rg) alpha_du alpha_pr  ls\n",
      "  30  1.4526492e+02 1.41e-11 9.63e-01  -3.8 3.34e-05    -  1.00e+00 1.00e+00H  1\n",
      "  31  1.4526483e+02 5.65e-12 9.62e-01  -3.8 4.81e-05    -  1.00e+00 1.00e+00F  1\n",
      "  32  1.4526483e+02 2.67e-07 1.17e+00  -3.8 1.40e-05    -  1.00e+00 1.00e+00f  1\n",
      "  33  1.4526494e+02 1.25e-11 1.51e+00  -3.8 2.78e-05    -  1.00e+00 1.00e+00H  1\n",
      "  34  1.4526485e+02 6.48e-12 1.17e+00  -3.8 4.06e-05    -  1.00e+00 1.00e+00F  1\n",
      "  35  1.4526487e+02 2.86e-07 1.24e+00  -3.8 2.52e-05    -  1.00e+00 5.00e-01f  2\n",
      "  36  1.4526487e+02 8.82e-09 1.43e+00  -3.8 2.74e-07   6.4 1.00e+00 1.00e+00h  1\n",
      "  37  1.4526484e+02 3.83e-12 1.57e+00  -3.8 2.50e-05    -  1.00e+00 1.00e+00H  1\n",
      "  38  1.4526480e+02 3.04e-07 1.22e+00  -3.8 1.56e-05    -  1.00e+00 1.00e+00f  1\n",
      "  39  1.4526491e+02 6.40e-07 1.23e+00  -3.8 4.81e-05    -  1.00e+00 1.00e+00h  1\n",
      "iter    objective    inf_pr   inf_du lg(mu)  ||d||  lg(rg) alpha_du alpha_pr  ls\n",
      "  40  1.4526491e+02 5.45e-07 1.58e+00  -3.8 8.50e-06    -  1.00e+00 1.25e-01h  4\n",
      "  41  1.4526491e+02 5.36e-07 9.83e-01  -3.8 9.23e-07   6.8 1.00e+00 1.56e-02h  7\n",
      "  42  1.4526491e+02 5.31e-07 9.73e-01  -3.8 2.72e-05    -  1.00e+00 7.81e-03h  8\n",
      "  43  1.4526491e+02 5.26e-07 9.63e-01  -3.8 6.75e-06    -  1.00e+00 7.81e-03h  8\n",
      "  44  1.4526491e+02 5.26e-07 1.89e+00  -3.8 7.86e-06   6.3 1.00e+00 9.77e-04h 11\n",
      "  45  1.4526488e+02 2.45e-07 9.44e-01  -3.8 6.09e-06    -  1.00e+00 1.00e+00h  1\n",
      "  46  1.4526495e+02 6.30e-07 1.05e+00  -3.8 3.30e-05    -  1.00e+00 1.00e+00h  1\n",
      "  47  1.4526495e+02 3.47e-08 1.34e+00  -3.8 1.25e-06   5.8 1.00e+00 1.00e+00h  1\n",
      "  48  1.4526479e+02 2.43e-07 1.18e+00  -3.8 8.20e-05    -  1.00e+00 1.00e+00h  1\n",
      "  49  1.4526491e+02 5.53e-07 1.34e+00  -3.8 5.87e-05    -  1.00e+00 1.00e+00h  1\n",
      "iter    objective    inf_pr   inf_du lg(mu)  ||d||  lg(rg) alpha_du alpha_pr  ls\n",
      "  50  1.4526488e+02 2.77e-07 6.71e-01  -3.8 3.52e-05    -  1.00e+00 5.00e-01h  2\n",
      "  51  1.4526488e+02 1.38e-08 5.12e+00  -3.8 3.26e-07   7.2 1.00e+00 1.00e+00h  1\n",
      "  52  1.4526490e+02 1.34e-11 1.46e+00  -3.8 5.70e-06    -  1.00e+00 1.00e+00H  1\n",
      "  53  1.4526490e+02 8.24e-09 1.15e+00  -3.8 9.29e-08   6.7 1.00e+00 1.00e+00h  1\n",
      "  54  1.4526486e+02 5.59e-12 1.18e+00  -3.8 2.49e-05    -  1.00e+00 1.00e+00H  1\n",
      "  55  1.4526486e+02 2.00e-09 1.32e+00  -3.8 3.15e-08   7.1 1.00e+00 1.00e+00h  1\n",
      "  56  1.4526487e+02 8.94e-12 1.27e+00  -3.8 8.36e-06    -  1.00e+00 1.00e+00H  1\n",
      "  57  1.4526489e+02 3.20e-07 1.05e+00  -3.8 9.13e-06    -  1.00e+00 5.00e-01h  2\n",
      "  58  1.4526484e+02 1.68e-12 1.51e+00  -3.8 2.13e-05    -  1.00e+00 1.00e+00H  1\n",
      "  59  1.4526486e+02 3.63e-07 1.25e+00  -3.8 1.16e-05    -  1.00e+00 5.00e-01f  2\n",
      "iter    objective    inf_pr   inf_du lg(mu)  ||d||  lg(rg) alpha_du alpha_pr  ls\n",
      "  60  1.4526486e+02 3.61e-07 1.24e+00  -3.8 2.68e-05    -  1.00e+00 7.81e-03h  8\n",
      "  61  1.4526495e+02 1.78e-15 1.60e+00  -3.8 3.89e-05    -  1.00e+00 1.00e+00H  1\n",
      "  62  1.4526492e+02 6.29e-12 1.85e+00  -3.8 2.55e-05    -  1.00e+00 1.00e+00F  1\n",
      "  63  1.4526486e+02 1.78e-15 2.04e+00  -3.8 4.85e-05    -  1.00e+00 1.00e+00F  1\n",
      "  64  1.4526483e+02 6.71e-07 2.28e+00  -3.8 1.02e-05    -  1.00e+00 1.00e+00f  1\n",
      "  65  1.4526485e+02 3.38e-07 1.59e+00  -3.8 1.86e-05    -  1.00e+00 5.00e-01h  2\n",
      "  66  1.4526485e+02 1.64e-07 2.86e+00  -3.8 1.27e-06   6.6 1.00e+00 5.00e-01h  2\n",
      "  67  1.4526485e+02 2.23e-08 3.96e+00  -3.8 1.22e-06   6.2 1.00e+00 1.00e+00h  1\n",
      "  68  1.4526496e+02 1.42e-14 1.87e+00  -3.8 4.62e-05    -  1.00e+00 1.00e+00H  1\n",
      "  69  1.4526493e+02 4.25e-12 1.65e+00  -3.8 2.19e-05    -  1.00e+00 1.00e+00F  1\n",
      "iter    objective    inf_pr   inf_du lg(mu)  ||d||  lg(rg) alpha_du alpha_pr  ls\n",
      "  70  1.4526493e+02 8.88e-12 1.12e+00  -3.8 1.46e-07   6.6 1.00e+00 1.00e+00H  1\n",
      "  71  1.4526493e+02 7.17e-12 9.47e-01  -3.8 4.06e-08   7.0 1.00e+00 1.00e+00H  1\n",
      "  72  1.4526477e+02 7.68e-12 1.31e+00  -3.8 1.02e-04    -  1.00e+00 1.00e+00F  1\n",
      "  73  1.4526493e+02 6.33e-07 1.56e+00  -3.8 1.02e-04    -  1.00e+00 1.00e+00f  1\n",
      "  74  1.4526493e+02 6.44e-08 1.05e+01  -3.8 2.63e-06   6.5 1.00e+00 1.00e+00h  1\n",
      "  75  1.4526475e+02 1.93e-07 1.68e+00  -3.8 7.84e-05    -  1.00e+00 1.00e+00h  1\n",
      "  76  1.4526475e+02 1.10e-08 1.61e+00  -3.8 1.72e-07   7.0 1.00e+00 1.00e+00h  1\n",
      "  77  1.4526489e+02 4.93e-07 1.81e+00  -3.8 4.90e-05    -  1.00e+00 1.00e+00h  1\n",
      "  78  1.4526489e+02 2.31e-07 3.24e+00  -3.8 8.50e-07   6.5 1.00e+00 5.00e-01h  2\n",
      "  79  1.4526491e+02 3.67e-12 1.44e+00  -3.8 7.98e-06    -  1.00e+00 1.00e+00H  1\n",
      "iter    objective    inf_pr   inf_du lg(mu)  ||d||  lg(rg) alpha_du alpha_pr  ls\n",
      "  80  1.4526489e+02 7.28e-12 1.30e+00  -3.8 2.58e-05    -  1.00e+00 1.00e+00F  1\n",
      "  81  1.4526489e+02 6.65e-09 1.32e+00  -3.8 6.80e-08   6.9 1.00e+00 1.00e+00h  1\n",
      "  82  1.4526481e+02 6.32e-13 1.12e+00  -3.8 4.42e-05    -  1.00e+00 1.00e+00H  1\n",
      "  83  1.4526483e+02 3.54e-07 1.62e+00  -3.8 2.58e-05    -  1.00e+00 1.00e+00f  1\n",
      "  84  1.4526490e+02 5.90e-12 9.59e-01  -3.8 1.79e-05    -  1.00e+00 1.00e+00H  1\n",
      "  85  1.4526490e+02 1.27e-08 3.20e+00  -3.8 6.21e-07   6.4 1.00e+00 1.00e+00h  1\n",
      "  86  1.4526490e+02 1.93e-09 1.08e+00  -3.8 6.30e-08   6.9 1.00e+00 1.00e+00h  1\n",
      "  87  1.4526486e+02 3.55e-07 1.24e+00  -3.8 2.04e-05    -  1.00e+00 1.00e+00h  1\n",
      "  88  1.4526486e+02 3.08e-07 1.67e+00  -3.8 6.15e-07   6.4 1.00e+00 1.25e-01h  4\n",
      "  89  1.4526483e+02 1.46e-07 9.78e-01  -3.8 2.71e-05    -  1.00e+00 5.00e-01h  2\n",
      "iter    objective    inf_pr   inf_du lg(mu)  ||d||  lg(rg) alpha_du alpha_pr  ls\n",
      "  90  1.4526489e+02 1.07e-14 9.78e-01  -3.8 2.51e-05    -  1.00e+00 1.00e+00H  1\n",
      "  91  1.4526489e+02 4.36e-12 1.29e+00  -3.8 5.68e-08   6.8 1.00e+00 1.00e+00H  1\n",
      "  92  1.4526489e+02 1.82e-12 1.75e+00  -3.8 2.54e-08   7.2 1.00e+00 1.00e+00H  1\n",
      "  93  1.4526489e+02 5.57e-09 1.15e+00  -3.8 5.30e-08   6.8 1.00e+00 1.00e+00h  1\n",
      "  94  1.4526487e+02 3.55e-07 1.63e+00  -3.8 1.19e-05    -  1.00e+00 1.00e+00h  1\n",
      "  95  1.4526484e+02 3.42e-07 1.32e+00  -3.8 2.04e-05    -  1.00e+00 1.00e+00h  1\n",
      "  96  1.4526485e+02 4.05e-07 1.31e+00  -3.8 9.21e-06    -  1.00e+00 1.00e+00h  1\n",
      "  97  1.4526485e+02 3.69e-12 2.02e+00  -3.8 1.00e-05    -  1.00e+00 1.00e+00H  1\n",
      "  98  1.4526486e+02 8.73e-07 1.56e+00  -3.8 9.05e-06    -  1.00e+00 1.00e+00f  1\n",
      "  99  1.4526486e+02 2.25e-08 8.01e+00  -3.8 5.14e-07   7.2 1.00e+00 1.00e+00h  1\n",
      "iter    objective    inf_pr   inf_du lg(mu)  ||d||  lg(rg) alpha_du alpha_pr  ls\n",
      " 100  1.4526486e+02 3.21e-09 1.80e+00  -3.8 4.33e-08   7.6 1.00e+00 1.00e+00h  1\n",
      "\n",
      "Number of Iterations....: 100\n",
      "\n",
      "                                   (scaled)                 (unscaled)\n",
      "Objective...............:   1.4526486063971103e+02    1.4526486063971103e+02\n",
      "Dual infeasibility......:   1.7992510525814200e+00    1.7992510525814200e+00\n",
      "Constraint violation....:   3.2123503856951174e-09    3.2123503856951174e-09\n",
      "Variable bound violation:   0.0000000000000000e+00    0.0000000000000000e+00\n",
      "Complementarity.........:   1.5042419978237212e-04    1.5042419978237212e-04\n",
      "Overall NLP error.......:   1.7992510525814200e+00    1.7992510525814200e+00\n",
      "\n",
      "\n",
      "Number of objective function evaluations             = 205\n",
      "Number of objective gradient evaluations             = 101\n",
      "Number of equality constraint evaluations            = 205\n",
      "Number of inequality constraint evaluations          = 205\n",
      "Number of equality constraint Jacobian evaluations   = 101\n",
      "Number of inequality constraint Jacobian evaluations = 101\n",
      "Number of Lagrangian Hessian evaluations             = 100\n",
      "Total seconds in IPOPT                               = 87.929\n",
      "\n",
      "EXIT: Maximum Number of Iterations Exceeded.\n",
      "      solver  :   t_proc      (avg)   t_wall      (avg)    n_eval\n",
      "       nlp_f  |   2.93ms ( 14.27us)   2.88ms ( 14.04us)       205\n",
      "       nlp_g  | 447.10ms (  2.18ms) 445.70ms (  2.17ms)       205\n",
      "  nlp_grad_f  |   2.35ms ( 23.00us)   2.32ms ( 22.75us)       102\n",
      "  nlp_hess_l  |  83.27 s (832.69ms)  83.27 s (832.70ms)       100\n",
      "   nlp_jac_g  |   4.04 s ( 39.56ms)   4.04 s ( 39.59ms)       102\n",
      "       total  |  87.93 s ( 87.93 s)  87.93 s ( 87.93 s)         1\n",
      "Solver fails return last iteration results!\n"
     ]
    }
   ],
   "source": [
    "T = 50\n",
    "\n",
    "prob = Opti()\n",
    "x = prob.variable(4, T+1)\n",
    "u = prob.variable(1, T)\n",
    "\n",
    "# initial condition\n",
    "x0 = np.array([0, np.pi, 0, 0])\n",
    "# initial condition constraints\n",
    "prob.subject_to(x[:, 0] == x0)\n",
    "\n",
    "# target\n",
    "x_target = np.array([0, 0, 0, 0])\n",
    "# we do not set terminal condition but using running cost to push carpole up\n",
    "Q = diag(SX([0.01, 1, 0.01, 0.01]))\n",
    "R = diag(SX([0.01]))\n",
    "x_sym = SX.sym(\"x\", 4)\n",
    "u_sym = SX.sym(\"u\", 1)\n",
    "cost_fn = Function('cost', [x_sym, u_sym], [(x_sym-x_target).T @ Q @ (x_sym-x_target) + u_sym.T @ R @ u_sym])\n",
    "J = 0\n",
    "for i in range(T):\n",
    "    # dynamics constraints\n",
    "    prob.subject_to(x[:, i+1] == mujoco_dyanmics(x[:, i], u[:, i]))\n",
    "    J = J + cost_fn(x[:, i], u[:, i])\n",
    "# control limit\n",
    "prob.subject_to([u>=-3, u<=3])\n",
    "# minimize running cost\n",
    "prob.minimize(J)\n",
    "\n",
    "# set initial guess (it is crtical to obtain the solution in current NLP formulation)\n",
    "x_init = np.swapaxes(np.linspace(x0, x_target, T+1), 0, 1)\n",
    "prob.set_initial(x, x_init)\n",
    "prob.solver(\"ipopt\", {}, {\"max_iter\": 100})\n",
    "\n",
    "try:\n",
    "    sol = prob.solve()\n",
    "    traj_x = np.swapaxes(sol.value(x), 0, 1)\n",
    "    traj_u = sol.value(u)\n",
    "except:\n",
    "    traj_x = np.swapaxes(prob.debug.value(x), 0, 1)\n",
    "    traj_u = prob.debug.value(u)\n",
    "    print(\"Solver fails return last iteration results!\")\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<table class=\"show_videos\" style=\"border-spacing:0px;\"><tr><td style=\"padding:1px;\"><video controls width=\"320\" height=\"240\" style=\"object-fit:cover;\" loop autoplay muted>\n",
       "      <source src=\"data:video/mp4;base64,AAAAIGZ0eXBpc29tAAACAGlzb21pc28yYXZjMW1wNDEAAAAIZnJlZQAAG6VtZGF0AAACfwYF//973EXpvebZSLeWLNgg2SPu73gyNjQgLSBjb3JlIDE2MyByMzA2MCA1ZGI2YWE2IC0gSC4yNjQvTVBFRy00IEFWQyBjb2RlYyAtIENvcHlsZWZ0IDIwMDMtMjAyMSAtIGh0dHA6Ly93d3cudmlkZW9sYW4ub3JnL3gyNjQuaHRtbCAtIG9wdGlvbnM6IGNhYmFjPTEgcmVmPTMgZGVibG9jaz0xOjA6MCBhbmFseXNlPTB4MzoweDExMyBtZT1oZXggc3VibWU9NyBwc3k9MSBwc3lfcmQ9MS4wMDowLjAwIG1peGVkX3JlZj0xIG1lX3JhbmdlPTE2IGNocm9tYV9tZT0xIHRyZWxsaXM9MSA4eDhkY3Q9MSBjcW09MCBkZWFkem9uZT0yMSwxMSBmYXN0X3Bza2lwPTEgY2hyb21hX3FwX29mZnNldD0tMiB0aHJlYWRzPTcgbG9va2FoZWFkX3RocmVhZHM9MSBzbGljZWRfdGhyZWFkcz0wIG5yPTAgZGVjaW1hdGU9MSBpbnRlcmxhY2VkPTAgYmx1cmF5X2NvbXBhdD0wIGNvbnN0cmFpbmVkX2ludHJhPTAgYmZyYW1lcz0zIGJfcHlyYW1pZD0yIGJfY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0AAAABAAACAAAAAAEAAAQAAAAAAgAAAQAAAAABAAADAAAAAAEAAAEAAAAAAQAAAwAAAAABAAABAAAAAAEAAAUAAAAAAQAAAgAAAAABAAAAAAAAAAEAAAEAAAAAAQAAAwAAAAABAAABAAAAAAEAAAQAAAAAAgAAAQAAAAABAAACAAAAAAEAAAMAAAAAAQAAAQAAAAABAAACAAAAAAEAAAMAAAAAAQAAAQAAAAABAAAEAAAAAAIAAAEAAAAAAQAABAAAAAACAAABAAAAAAEAAAUAAAAAAQAAAgAAAAABAAAAAAAAAAEAAAEAAAAAAQAABQAAAAABAAACAAAAAAEAAAAAAAAAAQAAAQAAAAABAAAEAAAAAAIAAAEAAAAAAQAABAAAAAACAAABAAAAAAEAAAUAAAAAAQAAAgAAAAABAAAAAAAAAAEAAAEAAAAAAQAABQAAAAABAAACAAAAAAEAAAAAAAAAAQAAAQAAAAAcc3RzYwAAAAAAAAABAAAAAQAAADMAAAABAAAA4HN0c3oAAAAAAAAAAAAAADMAAAScAAAAfQAAADIAAAA9AAAAkQAAAFMAAADMAAAAXQAAAYYAAADNAAAAggAAAJ4AAAF0AAAAyQAAAQgAAADbAAAAswAAAP8AAAFiAAAAlwAAAMwAAAC+AAAAQwAAAHsAAABLAAAANgAAAEAAAAAxAAAAIAAAADEAAAAbAAAAGwAAABYAAAAhAAAAFAAAABEAAAAQAAAAdQAAACIAAAAfAAAAngAAADIAAAAjAAABBQAAAEgAAAArAAAAJQAAAK4AAABLAAAANwAAACcAAAAUc3RjbwAAAAAAAAABAAAAMAAAAGJ1ZHRhAAAAWm1ldGEAAAAAAAAAIWhkbHIAAAAAAAAAAG1kaXJhcHBsAAAAAAAAAAAAAAAALWlsc3QAAAAlqXRvbwAAAB1kYXRhAAAAAQAAAABMYXZmNTguNzYuMTAw\" type=\"video/mp4\"/>\n",
       "      This browser does not support the video tag.\n",
       "      </video></td></tr></table>"
      ],
      "text/plain": [
       "<IPython.core.display.HTML object>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "frames = []\n",
    "for state in traj_x:\n",
    "    data.qpos = state[:2]\n",
    "    data.qvel = state[2:]\n",
    "    mujoco.mj_forward(model, data)\n",
    "    renderer.update_scene(data)\n",
    "    pixels = renderer.render()\n",
    "    frames.append(pixels)\n",
    "media.show_video(frames, fps=1/0.02)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<table class=\"show_videos\" style=\"border-spacing:0px;\"><tr><td style=\"padding:1px;\"><video controls width=\"320\" height=\"240\" style=\"object-fit:cover;\" loop autoplay muted>\n",
       "      <source src=\"data:video/mp4;base64,AAAAIGZ0eXBpc29tAAACAGlzb21pc28yYXZjMW1wNDEAAAAIZnJlZQAAGzdtZGF0AAACfwYF//973EXpvebZSLeWLNgg2SPu73gyNjQgLSBjb3JlIDE2MyByMzA2MCA1ZGI2YWE2IC0gSC4yNjQvTVBFRy00IEFWQyBjb2RlYyAtIENvcHlsZWZ0IDIwMDMtMjAyMSAtIGh0dHA6Ly93d3cudmlkZW9sYW4ub3JnL3gyNjQuaHRtbCAtIG9wdGlvbnM6IGNhYmFjPTEgcmVmPTMgZGVibG9jaz0xOjA6MCBhbmFseXNlPTB4MzoweDExMyBtZT1oZXggc3VibWU9NyBwc3k9MSBwc3lfcmQ9MS4wMDowLjAwIG1peGVkX3JlZj0xIG1lX3JhbmdlPTE2IGNocm9tYV9tZT0xIHRyZWxsaXM9MSA4eDhkY3Q9MSBjcW09MCBkZWFkem9uZT0yMSwxMSBmYXN0X3Bza2lwPTEgY2hyb21hX3FwX29mZnNldD0tMiB0aHJlYWRzPTcgbG9va2FoZWFkX3RocmVhZHM9MSBzbGljZWRfdGhyZWFkcz0wIG5yPTAgZGVjaW1hdGU9MSBpbnRlcmxhY2VkPTAgYmx1cmF5X2NvbXBhdD0wIGNvbnN0cmFpbmVkX2ludHJhPTAgYmZyYW1lcz0zIGJfcHlyYW1pZD0yIGJ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AAAQAAAAAAAAABAAABAAAAAAEAAAMAAAAAAQAAAQAAAAABAAAEAAAAAAIAAAEAAAAAAQAAAgAAAAABAAADAAAAAAEAAAEAAAAAAQAAAgAAAAABAAADAAAAAAEAAAEAAAAAAQAABAAAAAACAAABAAAAAAEAAAQAAAAAAgAAAQAAAAABAAAFAAAAAAEAAAIAAAAAAQAAAAAAAAABAAABAAAAAAEAAAUAAAAAAQAAAgAAAAABAAAAAAAAAAEAAAEAAAAAAQAABAAAAAACAAABAAAAAAEAAAQAAAAAAgAAAQAAAAABAAAFAAAAAAEAAAIAAAAAAQAAAAAAAAABAAABAAAAAAEAAAUAAAAAAQAAAgAAAAABAAAAAAAAAAEAAAEAAAAAHHN0c2MAAAAAAAAAAQAAAAEAAAAyAAAAAQAAANxzdHN6AAAAAAAAAAAAAAAyAAAEpgAAAIwAAABOAAAALAAAAE8AAADLAAAAXQAAAYUAAADMAAAAewAAAKAAAAF0AAAAyQAAAQ4AAADLAAAAqQAAAQAAAAFXAAAAlAAAAMgAAADdAAAASAAAAI0AAABMAAAAOgAAAEMAAAAzAAAAKAAAACAAAAAdAAAAHQAAABgAAAAhAAAAEwAAABEAAAAQAAAAdQAAACMAAAAdAAAAnwAAADIAAAAjAAABBQAAAEUAAAApAAAAJgAAAKsAAAA/AAAAOAAAAC0AAAAUc3RjbwAAAAAAAAABAAAAMAAAAGJ1ZHRhAAAAWm1ldGEAAAAAAAAAIWhkbHIAAAAAAAAAAG1kaXJhcHBsAAAAAAAAAAAAAAAALWlsc3QAAAAlqXRvbwAAAB1kYXRhAAAAAQAAAABMYXZmNTguNzYuMTAw\" type=\"video/mp4\"/>\n",
       "      This browser does not support the video tag.\n",
       "      </video></td></tr></table>"
      ],
      "text/plain": [
       "<IPython.core.display.HTML object>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "mujoco.mj_resetData(model, data) \n",
    "state = x0\n",
    "frames = []\n",
    "for u in traj_u:\n",
    "    state = mujoco_dyanmics(state, u).full().flatten()\n",
    "    data.qpos = state[:2]\n",
    "    data.qvel = state[2:]\n",
    "    mujoco.mj_forward(model, data)\n",
    "    renderer.update_scene(data)\n",
    "    pixels = renderer.render()\n",
    "    frames.append(pixels)\n",
    "media.show_video(frames, fps=1/0.02)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Try SNOPT solver\n",
    "\n",
    "This require SNOPT to be installed with casadi."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      " ==============================\n",
      "    SNOPT  C interface  2.2.0   \n",
      " ==============================\n",
      " S N O P T  7.7.7    (Feb 2021)\n",
      " ==============================\n",
      "\n",
      " SNMEMB EXIT 100 -- finished successfully\n",
      " SNMEMB INFO 104 -- memory requirements estimated\n",
      "\n",
      " Trial version of SNOPT -- for evaluation or academic purposes only\n",
      "\n",
      "\n",
      "\n",
      " Nonlinear constraints     308     Linear constraints       0\n",
      " Nonlinear variables       254     Linear variables         0\n",
      " Jacobian  variables       254     Objective variables    254\n",
      " Total constraints         308     Total variables        254\n",
      "\n",
      "\n",
      "\n",
      " The user has defined    1308   out of    1308   constraint gradients.\n",
      " The user has defined     254   out of     254   objective  gradients.\n",
      "\n",
      "\n",
      " Major Minors     Step   nCon Feasible  Optimal  MeritFunction     nS Penalty\n",
      "     0     87               1  1.4E-01  3.3E-01  0.0000000E+00     10           r i\n",
      "     1     34  1.3E-01      2  1.2E-01  3.1E-01  3.9130122E+05     24 8.4E+05   rli\n",
      "     2     24  1.9E-01      4  9.6E-02  2.6E-01  3.2248337E+05     15 8.4E+05   rli\n",
      "     3     18  8.2E-01      7  8.0E-02  3.9E-01  9.1237219E+04     12 3.7E+05 sM  i\n",
      "     4     11  1.0E+00      8  3.4E-02  9.8E-02  4.2551278E+04      8 2.2E+03     i\n",
      "     5      2  1.0E+00      9  4.7E-02  5.3E-01  4.0680421E+04      7 1.9E+02     i\n",
      "     6      3  1.0E+00     10  4.3E-02  6.8E-03  4.0653098E+04      5 1.6E+03     i\n",
      "     7      1  1.0E+00     11  4.3E-02  2.9E-03  4.0591187E+04      5 1.1E+02     i\n",
      "     8      1  1.0E+00     12  4.3E-02  8.3E-03  4.0587848E+04      5 7.9E+01     i\n",
      "     9      1  1.0E+00     13  4.3E-02  4.3E-04  4.0584093E+04      5 7.9E+01     i\n",
      "\n",
      " Major Minors     Step   nCon Feasible  Optimal  MeritFunction     nS Penalty\n",
      "    10      1  1.0E+00     14  4.3E-02  6.8E-04  4.0583951E+04      5 7.9E+01     i\n",
      "    11      1  1.0E+00     15  4.3E-02  2.6E-04  4.0583867E+04      5 7.9E+01     i\n",
      "    12      1  1.0E+00     16  4.3E-02  1.9E-04  4.0583845E+04      5 7.9E+01     i\n",
      "    13      1  1.0E+00     17  4.3E-02  6.1E-05  4.0583836E+04      5 7.9E+01   R i\n",
      "    14      1  1.0E+00     18  4.3E-02  2.0E-04  4.0583833E+04      5 7.9E+01 s   i\n",
      "    15      1  1.0E+00     19  4.3E-02  4.8E-05  4.0583831E+04      5 7.9E+01     i\n",
      "    16      1  1.0E+00     20  4.3E-02  1.4E-05  4.0583831E+04      5 7.9E+01     i\n",
      "    17      1  1.0E+00     21  4.3E-02  5.4E-06  4.0583831E+04      5 7.9E+01     i\n",
      "    18      1  1.0E+00     22  4.3E-02  2.4E-06  4.0583831E+04      5 7.9E+01     i\n",
      "    19      6  1.0E+00     23  4.3E-02 (6.9E-07) 4.0583831E+09      3 7.9E+01     i\n",
      "\n",
      " SNOPTC EXIT  10 -- the problem appears to be infeasible\n",
      " SNOPTC INFO  13 -- nonlinear infeasibilities minimized\n",
      "\n",
      " Problem name                 solver\n",
      " No. of iterations                 197   Objective            0.0000000000E+00\n",
      " No. of major iterations            19   Linear    obj. term  0.0000000000E+00\n",
      " Penalty parameter           7.913E+01   Nonlinear obj. term  0.0000000000E+00\n",
      " No. of infeasibilities              1   Sum of infeas        4.0583830513E-01\n",
      " Elastic weight                1.0E+10   Elastic   objective  4.0583830513E+09\n",
      " No. of infeas elastics              1   Elastic infeas       4.0583830513E-01\n",
      " User function calls (total)        24\n",
      " No. of superbasics                  3   No. of basic nonlinears           251\n",
      " No. of degenerate steps             0   Percentage                       0.00\n",
      " Max x                      96 9.4E+00   Max pi                     98 1.0E+10\n",
      " Max Primal infeas         352 4.1E-01   Max Dual infeas            30 6.9E+03\n",
      " Nonlinear constraint violn    4.1E-01\n",
      "\n",
      "\n",
      "\n",
      " Solution printed on file  10\n",
      "      solver  :   t_proc      (avg)   t_wall      (avg)    n_eval\n",
      "   nlp_jac_f  | 129.00us (  4.96us)  64.98us (  2.50us)        26\n",
      "   nlp_jac_g  |   1.03 s ( 39.49ms)   1.02 s ( 39.38ms)        26\n",
      "       total  |   1.04 s (  1.04 s)   1.04 s (  1.04 s)         1\n",
      "Solver fails!\n",
      "\n",
      " Time for MPS input                             0.00 seconds\n",
      " Time for solving problem                       0.96 seconds\n",
      " Time for solution output                       0.00 seconds\n",
      " Time for constraint functions                  0.99 seconds\n",
      " Time for objective function                    0.00 seconds\n"
     ]
    }
   ],
   "source": [
    "T = 50\n",
    "\n",
    "prob = Opti()\n",
    "x = prob.variable(4, T+1)\n",
    "u = prob.variable(1, T)\n",
    "\n",
    "# initial condition\n",
    "x0 = np.array([0, np.pi, 0, 0])\n",
    "# target\n",
    "x_target = np.array([0, 0, 0, 0])\n",
    "# initial condition constraints\n",
    "prob.subject_to(x[:, 0] == x0)\n",
    "# terminal condition\n",
    "prob.subject_to(x[:, -1] == x_target)\n",
    "for i in range(T):\n",
    "    # dynamics constraints\n",
    "    prob.subject_to(x[:, i+1] == mujoco_dyanmics(x[:, i], u[:, i]))\n",
    "# control limit\n",
    "prob.subject_to([u>=-3, u<=3])\n",
    "# just feasible problem, no objective\n",
    "prob.minimize(0)\n",
    "\n",
    "# set initial guess (it is crtical to obtain the solution in current NLP formulation)\n",
    "x_init = np.swapaxes(np.linspace(x0, x_target, T+1), 0, 1)\n",
    "prob.set_initial(x, x_init)\n",
    "prob.solver(\"snopt\")\n",
    "\n",
    "try:\n",
    "    sol = prob.solve()\n",
    "    traj_x = np.swapaxes(sol.value(x), 0, 1)\n",
    "    traj_u = sol.value(u)\n",
    "except:\n",
    "    traj_x = np.swapaxes(prob.debug.value(x), 0, 1)\n",
    "    traj_u = prob.debug.value(u)\n",
    "    print(\"Solver fails!\")\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 12,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<table class=\"show_videos\" style=\"border-spacing:0px;\"><tr><td style=\"padding:1px;\"><video controls width=\"320\" height=\"240\" style=\"object-fit:cover;\" loop autoplay muted>\n",
       "      <source src=\"data:video/mp4;base64,AAAAIGZ0eXBpc29tAAACAGlzb21pc28yYXZjMW1wNDEAAAAIZnJlZQAAJRttZGF0AAACfwYF//973EXpvebZSLeWLNgg2SPu73gyNjQgLSBjb3JlIDE2MyByMzA2MCA1ZGI2YWE2IC0gSC4yNjQvTVBFRy00IEFWQyBjb2RlYyAtIENvcHlsZWZ0IDIwMDMtMjAyMSAtIGh0dHA6Ly93d3cudmlkZW9sYW4ub3JnL3gyNjQuaHRtbCAtIG9wdGlvbnM6IGNhYmFjPTEgcmVmPTMgZGVibG9jaz0xOjA6MCBhbmFseXNlPTB4MzoweDExMyBtZT1oZXggc3VibWU9NyBwc3k9MSBwc3lfcmQ9MS4wMDowLjAwIG1peGVkX3JlZj0xIG1lX3JhbmdlPTE2IGNocm9tYV9tZT0xIHRyZWxsaXM9MSA4eDhkY3Q9MSBjcW09MCBkZWFkem9uZT0yMSwxMSBmYXN0X3Bza2lwPTEgY2hyb21hX3FwX29mZnNldD0tMiB0aHJlYWRzPTcgbG9va2FoZWFkX3RocmVhZHM9MSBzbGljZWRfdGhyZWFkcz0wIG5yPTAgZGVjaW1hdGU9MSBpbnRlcmxhY2VkPTAgYmx1cmF5X2NvbXBhdD0wIGNvbnN0cmFpbmV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cwAAAAAAAAAsAAAAAQAAAgAAAAABAAAEAAAAAAIAAAEAAAAAAQAABAAAAAACAAABAAAAAAEAAAUAAAAAAQAAAgAAAAABAAAAAAAAAAEAAAEAAAAAAQAABAAAAAACAAABAAAAAAEAAAMAAAAAAQAAAQAAAAABAAAFAAAAAAEAAAIAAAAAAQAAAAAAAAABAAABAAAAAAEAAAUAAAAAAQAAAgAAAAABAAAAAAAAAAEAAAEAAAAAAQAABAAAAAACAAABAAAAAAEAAAMAAAAAAQAAAQAAAAABAAACAAAAAAEAAAMAAAAAAQAAAQAAAAACAAACAAAAAAEAAAUAAAAAAQAAAgAAAAABAAAAAAAAAAEAAAEAAAAAAQAABAAAAAACAAABAAAAAAEAAAUAAAAAAQAAAgAAAAABAAAAAAAAAAEAAAEAAAAAAQAABAAAAAACAAABAAAAAAEAAAIAAAAAAQAAAwAAAAABAAABAAAAABxzdHNjAAAAAAAAAAEAAAABAAAAMwAAAAEAAADgc3RzegAAAAAAAAAAAAAAMwAABJwAAAB6AAAALgAAAEAAAAC+AAAAQAAAAGQAAADwAAAAbQAAAGUAAABXAAAAfgAAAGwAAABTAAAAggAAAE4AAACEAAAAgAAAAFQAAAA8AAABSgAAAI0AAABSAAAAigAAAPkAAADqAAAAtAAAAW8AAADAAAABDgAAAVMAAACbAAABDgAAAQcAAAFDAAAAywAAAIgAAACZAAABPAAAAOwAAADJAAABHQAAAKwAAACOAAAAbgAAAL0AAABnAAAAXgAAALcAAACzAAAAGAAAABRzdGNvAAAAAAAAAAEAAAAwAAAAYnVkdGEAAABabWV0YQAAAAAAAAAhaGRscgAAAAAAAAAAbWRpcmFwcGwAAAAAAAAAAAAAAAAtaWxzdAAAACWpdG9vAAAAHWRhdGEAAAABAAAAAExhdmY1OC43Ni4xMDA=\" type=\"video/mp4\"/>\n",
       "      This browser does not support the video tag.\n",
       "      </video></td></tr></table>"
      ],
      "text/plain": [
       "<IPython.core.display.HTML object>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "frames = []\n",
    "for state in traj_x:\n",
    "    data.qpos = state[:2]\n",
    "    data.qvel = state[2:]\n",
    "    mujoco.mj_forward(model, data)\n",
    "    renderer.update_scene(data)\n",
    "    pixels = renderer.render()\n",
    "    frames.append(pixels)\n",
    "media.show_video(frames, fps=1/0.02)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 13,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<table class=\"show_videos\" style=\"border-spacing:0px;\"><tr><td style=\"padding:1px;\"><video controls width=\"320\" height=\"240\" style=\"object-fit:cover;\" loop autoplay muted>\n",
       "      <source src=\"data:video/mp4;base64,AAAAIGZ0eXBpc29tAAACAGlzb21pc28yYXZjMW1wNDEAAAAIZnJlZQAAHyNtZGF0AAACfwYF//973EXpvebZSLeWLNgg2SPu73gyNjQgLSBjb3JlIDE2MyByMzA2MCA1ZGI2YWE2IC0gSC4yNjQvTVBFRy00IEFWQyBjb2RlYyAtIENvcHlsZWZ0IDIwMDMtMjAyMSAtIGh0dHA6Ly93d3cudmlkZW9sYW4ub3JnL3gyNjQuaHRtbCAtIG9wdGlvbnM6IGNhYmFjPTEgcmVmPTMgZGVibG9jaz0xOjA6MCBhbmFseXNlPTB4MzoweDExMyBtZT1oZXggc3VibWU9NyBwc3k9MSBwc3lfcmQ9MS4wMDowLjAwIG1peGVkX3JlZj0xIG1lX3JhbmdlPTE2IGNocm9tYV9tZT0xIHRyZWxsaXM9MSA4eDhkY3Q9MSBjcW09MCBkZWFkem9uZT0yMSwxMSBmYXN0X3Bza2lwPTEgY2hyb21hX3FwX29mZnNldD0tMiB0aHJlYWRzPTcgbG9va2FoZWFkX3RocmVhZHM9MSBzbGljZWRfdGhyZWFkcz0wIG5yPTAgZGVjaW1hdGU9MSBpbnRlcmxhY2VkPTAgYmx1cmF5X2NvbXBhdD0wIGNvbnN0cmFpbmVkX2ludHJhPTAgYmZyYW1lcz0zIGJfcHlyYW1pZD0yIGJfYWRhcHQ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the video tag.\n",
       "      </video></td></tr></table>"
      ],
      "text/plain": [
       "<IPython.core.display.HTML object>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "mujoco.mj_resetData(model, data) \n",
    "state = x0\n",
    "frames = []\n",
    "for u in traj_u:\n",
    "    state = mujoco_dyanmics(state, u).full().flatten()\n",
    "    data.qpos = state[:2]\n",
    "    data.qvel = state[2:]\n",
    "    mujoco.mj_forward(model, data)\n",
    "    renderer.update_scene(data)\n",
    "    pixels = renderer.render()\n",
    "    frames.append(pixels)\n",
    "media.show_video(frames, fps=1/0.02)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 14,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      " ==============================\n",
      "    SNOPT  C interface  2.2.0   \n",
      " ==============================\n",
      " S N O P T  7.7.7    (Feb 2021)\n",
      " ==============================\n",
      "\n",
      " SNMEMB EXIT 100 -- finished successfully\n",
      " SNMEMB INFO 104 -- memory requirements estimated\n",
      "\n",
      " Trial version of SNOPT -- for evaluation or academic purposes only\n",
      "\n",
      "\n",
      "\n",
      " Nonlinear constraints     304     Linear constraints       0\n",
      " Nonlinear variables       254     Linear variables         0\n",
      " Jacobian  variables       254     Objective variables    254\n",
      " Total constraints         304     Total variables        254\n",
      "\n",
      "\n",
      "\n",
      " The user has defined    1304   out of    1304   constraint gradients.\n",
      " The user has defined     254   out of     254   objective  gradients.\n",
      "\n",
      "\n",
      " Major Minors     Step   nCon Feasible  Optimal  MeritFunction     nS Penalty\n",
      "     0     77               1  1.4E-01  2.4E-02  1.6946111E+02     34           r\n",
      "     1      8  2.0E-01      2  1.2E-01  2.1E-02 -7.1242571E+03     29 1.7E+04   rl\n",
      "     2     11  2.2E-01      3  9.8E-02  3.8E-02 -5.4218832E+03     33 1.7E+04 s  l\n",
      "     3     19  1.0E+00      5  7.1E-02  1.0E+00  2.2989238E+02     31 4.7E+02  m\n",
      "     4     17  1.0E+00      7  1.3E-01  4.3E-01  9.0785548E+02     28 9.0E+01  m\n",
      "     5      8  8.6E-01     10  2.5E-01  4.8E-01  4.9898235E+02     25 1.2E+02  m\n",
      "     6     20  1.0E+00     11  6.4E-02  2.9E-01  6.9743016E+02     14 8.2E+01\n",
      "     7     16  1.0E+00     12  7.5E-02  7.9E-02  7.8505021E+02     13 8.2E+01\n",
      "     8     15  1.0E+00     14  4.4E-02  4.1E-02  8.8184491E+02     17 8.2E+01  m\n",
      "     9      9  1.0E+00     15  2.1E-02  1.3E-01  9.1856482E+02     17 8.2E+01\n",
      "\n",
      " Major Minors     Step   nCon Feasible  Optimal  MeritFunction     nS Penalty\n",
      "    10      5  1.0E+00     17  1.3E-02  1.5E-01  9.5717815E+02     17 8.2E+01  m\n",
      "    11      7  1.0E+00     19  1.7E-02  9.6E-02  1.0061894E+03     15 8.2E+01  m\n",
      "    12      5  1.0E+00     21  2.4E-02  1.5E-02  1.0413606E+03     15 8.2E+01  MR\n",
      "    13     15  1.0E+00     23  6.0E-03  4.0E-03  1.0625243E+03     13 8.2E+01 sm\n",
      "    14      9  1.0E+00     25  1.5E-01  3.2E-02  1.1704841E+03      9 8.2E+01  m\n",
      "    15     10  1.0E+00     27  1.5E-01  2.7E-02  1.2358742E+03      6 8.2E+01  M\n",
      "    16      8  1.0E+00     29  2.0E-01  1.7E-02  1.2974647E+03      2 8.2E+01  m\n",
      "    17      2  1.0E+00     30  8.8E-02  5.4E-02  1.3571840E+03      1 8.2E+01\n",
      "    18      2  1.0E+00     31  8.9E-04  3.4E-03  1.3696482E+03      2 8.2E+01\n",
      "    19      2  1.0E+00     33  1.6E-03  6.0E-04  1.3698388E+03      1 8.2E+01  m\n",
      "\n",
      " Major Minors     Step   nCon Feasible  Optimal  MeritFunction     nS Penalty\n",
      "    20      1  1.0E+00     34  8.4E-04  2.1E-05  1.3732522E+03      1 8.2E+01\n",
      "    21      1  1.0E+00     36 (1.2E-07) 2.9E-05  1.3732553E+03      1 8.2E+01\n",
      "    22      1  1.0E+00     38 (1.5E-08) 1.3E-05  1.3732585E+03      1 8.2E+01   R\n",
      "    23      1  1.0E+00     40 (1.6E-08) 1.3E-05  1.3732618E+03      1 8.2E+01   R\n",
      "    24      1  1.0E+00     42 (1.6E-08) 1.3E-05  1.3732652E+03      1           r\n",
      "    25      1  1.0E+00     44  3.9E-05  1.7E-05  1.3735217E+03                  r\n",
      "    26      0  1.0E+00     45  2.1E-05 (1.0E-10) 1.3738281E+03                s\n",
      "    27      0  1.0E+00     46 (2.4E-14)(1.6E-13) 1.3738281E+03        3.5E+01\n",
      "\n",
      " SNOPTC EXIT   0 -- finished successfully\n",
      " SNOPTC INFO   1 -- optimality conditions satisfied\n",
      "\n",
      " Problem name                 solver\n",
      " No. of iterations                 271   Objective            1.3738280893E+03\n",
      " No. of major iterations            27   Linear    obj. term  0.0000000000E+00\n",
      " Penalty parameter           3.519E+01   Nonlinear obj. term  1.3738280893E+03\n",
      " User function calls (total)        47\n",
      " No. of degenerate steps             0   Percentage                       0.00\n",
      " Max x                     204 1.1E+01   Max pi                     66 4.4E+03\n",
      " Max Primal infeas         272 2.7E-13   Max Dual infeas            18 3.8E-13\n",
      " Nonlinear constraint violn    2.7E-13\n",
      "\n",
      "\n",
      "\n",
      " Solution printed on file  10\n",
      "      solver  :   t_proc      (avg)   t_wall      (avg)    n_eval\n",
      "   nlp_jac_f  |   2.12ms ( 43.33us)   1.83ms ( 37.45us)        49\n",
      "   nlp_jac_g  |   1.87 s ( 38.23ms)   1.87 s ( 38.23ms)        49\n",
      "       total  |   1.89 s (  1.89 s)   1.89 s (  1.89 s)         1\n",
      "\n",
      " Time for MPS input                             0.00 seconds\n",
      " Time for solving problem                       1.81 seconds\n",
      " Time for solution output                       0.00 seconds\n",
      " Time for constraint functions                  1.83 seconds\n",
      " Time for objective function                    0.00 seconds\n"
     ]
    }
   ],
   "source": [
    "T = 50\n",
    "\n",
    "prob = Opti()\n",
    "x = prob.variable(4, T+1)\n",
    "u = prob.variable(1, T)\n",
    "\n",
    "# initial condition\n",
    "x0 = np.array([0, np.pi, 0, 0])\n",
    "# initial condition constraints\n",
    "prob.subject_to(x[:, 0] == x0)\n",
    "\n",
    "# target\n",
    "x_target = np.array([0, 0, 0, 0])\n",
    "# we do not set terminal condition but using running cost to push carpole up\n",
    "Q = diag(SX([0.01, 1, 0.01, 0.01]))\n",
    "R = diag(SX([0.01]))\n",
    "x_sym = SX.sym(\"x\", 4)\n",
    "u_sym = SX.sym(\"u\", 1)\n",
    "cost_fn = Function('cost', [x_sym, u_sym], [(x_sym-x_target).T @ Q @ (x_sym-x_target) + u_sym.T @ R @ u_sym])\n",
    "J = 0\n",
    "for i in range(T):\n",
    "    # dynamics constraints\n",
    "    prob.subject_to(x[:, i+1] == mujoco_dyanmics(x[:, i], u[:, i]))\n",
    "    J = J + cost_fn(x[:, i], u[:, i])\n",
    "# control limit\n",
    "prob.subject_to([u>=-3, u<=3])\n",
    "# minimize running cost\n",
    "prob.minimize(J)\n",
    "\n",
    "# set initial guess (it is crtical to obtain the solution in current NLP formulation)\n",
    "x_init = np.swapaxes(np.linspace(x0, x_target, T+1), 0, 1)\n",
    "prob.set_initial(x, x_init)\n",
    "prob.solver(\"snopt\", {}, {\"max_iter\": 100})\n",
    "\n",
    "try:\n",
    "    sol = prob.solve()\n",
    "    traj_x = np.swapaxes(sol.value(x), 0, 1)\n",
    "    traj_u = sol.value(u)\n",
    "except:\n",
    "    traj_x = np.swapaxes(prob.debug.value(x), 0, 1)\n",
    "    traj_u = prob.debug.value(u)\n",
    "    print(\"Solver fails return last iteration results!\")\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 15,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<table class=\"show_videos\" style=\"border-spacing:0px;\"><tr><td style=\"padding:1px;\"><video controls width=\"320\" height=\"240\" style=\"object-fit:cover;\" loop autoplay muted>\n",
       "      <source src=\"data:video/mp4;base64,AAAAIGZ0eXBpc29tAAACAGlzb21pc28yYX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AAAABAAADAAAAAAEAAAEAAAAAAQAABQAAAAABAAACAAAAAAEAAAAAAAAAAQAAAQAAAAABAAAFAAAAAAEAAAIAAAAAAQAAAAAAAAABAAABAAAAAAEAAAUAAAAAAQAAAgAAAAABAAAAAAAAAAEAAAEAAAAAAwAAAgAAAAABAAADAAAAAAEAAAEAAAAAAQAAAwAAAAABAAABAAAAAAEAAAQAAAAAAgAAAQAAAAABAAADAAAAAAEAAAEAAAAAHHN0c2MAAAAAAAAAAQAAAAEAAAAzAAAAAQAAAOBzdHN6AAAAAAAAAAAAAAAzAAAEnAAAAHoAAAAuAAAAQAAAANgAAABYAAAAZQAAAU8AAACAAAAAhQAAAXcAAACiAAABKQAAAUEAAADCAAABEQAAANQAAAD4AAABSwAAAI0AAADaAAAAwQAAAHoAAABTAAAAQAAAAEMAAAAvAAAALwAAACkAAAAkAAAAIgAAACUAAAAXAAAAFwAAABMAAABUAAAAFgAAABAAAAAVAAAAXAAAAGQAAAB+AAABHAAAAGIAAAGGAAAAfwAAAbwAAADNAAAAmwAAAWkAAAEVAAAAFHN0Y28AAAAAAAAAAQAAADAAAABidWR0YQAAAFptZXRhAAAAAAAAACFoZGxyAAAAAAAAAABtZGlyYXBwbAAAAAAAAAAAAAAAAC1pbHN0AAAAJal0b28AAAAdZGF0YQAAAAEAAAAATGF2ZjU4Ljc2LjEwMA==\" type=\"video/mp4\"/>\n",
       "      This browser does not support the video tag.\n",
       "      </video></td></tr></table>"
      ],
      "text/plain": [
       "<IPython.core.display.HTML object>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "frames = []\n",
    "for state in traj_x:\n",
    "    data.qpos = state[:2]\n",
    "    data.qvel = state[2:]\n",
    "    mujoco.mj_forward(model, data)\n",
    "    renderer.update_scene(data)\n",
    "    pixels = renderer.render()\n",
    "    frames.append(pixels)\n",
    "media.show_video(frames, fps=1/0.02)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 16,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<table class=\"show_videos\" style=\"border-spacing:0px;\"><tr><td style=\"padding:1px;\"><video controls width=\"320\" height=\"240\" style=\"object-fit:cover;\" loop autoplay muted>\n",
       "      <source src=\"data:video/mp4;base64,AAAAIGZ0eXBpc29tAAACAGlzb21pc28yYXZjMW1wNDEAAAAIZnJlZQAAIjdtZGF0AAACfwYF//973EXpvebZSLeWLNgg2SPu73gyNjQgLSBjb3JlIDE2MyByMzA2MCA1ZGI2YWE2IC0gSC4yNjQvTVBFRy00IEFWQyBjb2RlYyAtIENvcHlsZWZ0IDIwMDMtMjAyMSAtIGh0dHA6Ly93d3cudmlkZW9sYW4ub3JnL3gyNjQuaHRtbCAtIG9wdGlvbnM6IGNhYmFjPTEgcmVmPTMgZGVibG9jaz0xOjA6MCBhbmFseXNlPTB4MzoweDExMyBtZT1oZXggc3VibWU9NyBwc3k9MSBwc3lfcmQ9MS4wMDowLjAwIG1peGVkX3JlZj0xIG1lX3JhbmdlPTE2IGNocm9tYV9tZT0xIHRyZWxsaXM9MSA4eDhkY3Q9MSBjcW09MCBkZWFkem9uZT0yMSwxMSBmYXN0X3Bza2lwPTEgY2hyb21hX3FwX29mZnNldD0tMiB0aHJlYWRzPTcgbG9va2FoZWFkX3RocmVhZHM9MSBzbGljZWRfdGhyZWFkcz0wIG5yPTAgZGVjaW1hdGU9MSBpbnRlcmxhY2VkPTAgYmx1cmF5X2NvbXBhdD0wIGNvbnN0cmFpbmVkX2ludHJhPTAgYmZyYW1lcz0zIGJfcHlyYW1pZD0yIGJfYWRhcHQ9MSBiX2JpYXM9MCBkaXJlY3Q9MSB3ZWlnaHRiPTEgb3Blbl9nb3A9MCB3ZWlnaHRwPTIga2V5aW50PTI1MCBrZXlpbnRfbWluPTI1IHNjZW5lY3V0PTQwIGludHJhX3JlZnJlc2g9MCByYz1jcXAgbWJ0cmVlPTAgcXA9MjAgaXBfcmF0aW89MS40MCBwYl9yYXRpbz0xLjMwIGFxPTAAgAA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AAAIAAAAAAQAAAwAAAAABAAABAAAAAAEAAAIAAAAAAQAABQAAAAABAAACAAAAAAEAAAAAAAAAAQAAAQAAAAABAAADAAAAAAEAAAEAAAAAAQAABQAAAAABAAACAAAAAAEAAAAAAAAAAQAAAQAAAAABAAAFAAAAAAEAAAIAAAAAAQAAAAAAAAABAAABAAAAAAEAAAUAAAAAAQAAAgAAAAABAAAAAAAAAAEAAAEAAAAAAwAAAgAAAAABAAADAAAAAAEAAAEAAAAAAQAAAwAAAAABAAABAAAAAAEAAAQAAAAAAgAAAQAAAAABAAADAAAAAAEAAAEAAAAAHHN0c2MAAAAAAAAAAQAAAAEAAAAyAAAAAQAAANxzdHN6AAAAAAAAAAAAAAAyAAAEuQAAAJAAAABAAAAAOAAAANIAAABSAAAAWwAAATEAAACHAAABcQAAAKgAAAEvAAABRAAAAMIAAAECAAAA2QAAAOsAAAFKAAAAmQAAAMQAAADOAAAAewAAAFcAAABBAAAATgAAADQAAAAwAAAALgAAACAAAAAjAAAAJQAAABgAAAAZAAAAFQAAAFQAAAAYAAAAEgAAABcAAABcAAAAZAAAAH4AAAEcAAAAZgAAAXkAAACIAAABugAAAN0AAACaAAABcAAAARYAAAAUc3RjbwAAAAAAAAABAAAAMAAAAGJ1ZHRhAAAAWm1ldGEAAAAAAAAAIWhkbHIAAAAAAAAAAG1kaXJhcHBsAAAAAAAAAAAAAAAALWlsc3QAAAAlqXRvbwAAAB1kYXRhAAAAAQAAAABMYXZmNTguNzYuMTAw\" type=\"video/mp4\"/>\n",
       "      This browser does not support the video tag.\n",
       "      </video></td></tr></table>"
      ],
      "text/plain": [
       "<IPython.core.display.HTML object>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "mujoco.mj_resetData(model, data) \n",
    "state = x0\n",
    "frames = []\n",
    "for u in traj_u:\n",
    "    state = mujoco_dyanmics(state, u).full().flatten()\n",
    "    data.qpos = state[:2]\n",
    "    data.qvel = state[2:]\n",
    "    mujoco.mj_forward(model, data)\n",
    "    renderer.update_scene(data)\n",
    "    pixels = renderer.render()\n",
    "    frames.append(pixels)\n",
    "media.show_video(frames, fps=1/0.02)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Trajectory optimization embeded on MPC formulation\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 17,
   "metadata": {},
   "outputs": [],
   "source": [
    "# target\n",
    "x_target = np.array([0, 0, 0, 0])\n",
    "# we do not set terminal condition but using running cost to push carpole up\n",
    "Q = diag(SX([0.01, 1, 0.01, 0.01]))\n",
    "R = diag(SX([0.01]))\n",
    "x_sym = SX.sym(\"x\", 4)\n",
    "u_sym = SX.sym(\"u\", 1)\n",
    "cost_fn = Function('cost', [x_sym, u_sym], [(x_sym-x_target).T @ Q @ (x_sym-x_target) + u_sym.T @ R @ u_sym])\n",
    "\n",
    "# Define construct sub-loop problem\n",
    "def solve_mpc_sub_loop(x0, cost_fn, init_guess=None, T=50, solver=\"ipopt\", max_iter=10, print_level=0):\n",
    "    prob = Opti()\n",
    "    x = prob.variable(4, T+1)\n",
    "    u = prob.variable(1, T)\n",
    "\n",
    "    # initial condition constraints\n",
    "    prob.subject_to(x[:, 0] == x0)\n",
    "\n",
    "    # control limit\n",
    "    prob.subject_to([u>=-3, u<=3])\n",
    "\n",
    "    J = 0\n",
    "    \n",
    "    for i in range(T):\n",
    "        # dynamics constraints\n",
    "        prob.subject_to(x[:, i+1] == mujoco_dyanmics(x[:, i], u[:, i]))\n",
    "        J = J + cost_fn(x[:, i], u[:, i])\n",
    "    # minimize running cost\n",
    "    prob.minimize(J)\n",
    "\n",
    "    if init_guess is not None:\n",
    "        # NOTE currently lam is not updated\n",
    "        if \"x\" in init_guess:\n",
    "            print(\"Setting the init for x\")\n",
    "            prob.set_initial(x, init_guess[\"x\"])\n",
    "        if \"u\" in init_guess:\n",
    "            print(\"Settiing the init for u\")\n",
    "            prob.set_initial(u, init_guess[\"u\"])\n",
    "\n",
    "    prob.solver(solver, {}, {\"max_iter\": max_iter, \"print_level\": print_level})\n",
    "    try:\n",
    "        sol = prob.solve()\n",
    "        traj_x = sol.value(x)\n",
    "        traj_u = sol.value(u)\n",
    "        if solver==\"ipopt\":\n",
    "            print(\"Solve with iter {:}\".format(prob.stats()[\"iter_count\"]))\n",
    "        else:\n",
    "            print(\"Solve successfully\")\n",
    "    except:\n",
    "        traj_x = prob.debug.value(x)\n",
    "        traj_u = prob.debug.value(u)\n",
    "        if solver==\"ipopt\":\n",
    "            print(\"Solver fails under iter {:} return last iteration results!\".format(prob.stats()[\"iter_count\"]))\n",
    "        else:\n",
    "            print(\"Solver fail\")\n",
    "\n",
    "    return {\"x\": traj_x, \"u\": traj_u}\n",
    "\n",
    "# Update the initial guess for new MPC\n",
    "def update_init_guess(last_results):\n",
    "    x = last_results[\"x\"]\n",
    "    u = last_results[\"u\"]\n",
    "\n",
    "    x_last = x[:, -1]\n",
    "    u_last = u[-1]\n",
    "\n",
    "    # Keep the new u_last same as previous u_last\n",
    "    u_new_last = np.copy(u_last)\n",
    "    # x initial guess by step dynamics for one step\n",
    "    x_new_last = mujoco_dyanmics(x_last, u_new_last)\n",
    "\n",
    "    x_new_guess = np.concatenate([x[:, 1:], x_new_last], axis=1)\n",
    "    u_new_guess = np.append(u[1:], u_new_last)\n",
    "\n",
    "    return {\"x\": x_new_guess, \"u\":u_new_guess}"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### MPC with IPOPT"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Setting the init for x\n",
      "      solver  :   t_proc      (avg)   t_wall      (avg)    n_eval\n",
      "       nlp_f  | 179.00us ( 16.27us) 172.63us ( 15.69us)        11\n",
      "       nlp_g  |  22.37ms (  2.03ms)  22.44ms (  2.04ms)        11\n",
      "  nlp_grad_f  | 281.00us ( 23.42us) 282.45us ( 23.54us)        12\n",
      "  nlp_hess_l  |   8.19 s (818.69ms)   8.20 s (819.56ms)        10\n",
      "   nlp_jac_g  | 473.18ms ( 39.43ms) 473.40ms ( 39.45ms)        12\n",
      "       total  |   8.70 s (  8.70 s)   8.71 s (  8.71 s)         1\n",
      "Solver fails under iter 10 return last iteration results!\n",
      "Setting the init for x\n",
      "Settiing the init for u\n",
      "      solver  :   t_proc      (avg)   t_wall      (avg)    n_eval\n",
      "       nlp_f  |  66.00us ( 16.50us)  61.02us ( 15.26us)         4\n",
      "       nlp_g  |   7.80ms (  1.95ms)   7.81ms (  1.95ms)         4\n",
      "  nlp_grad_f  |  98.00us ( 24.50us)  97.70us ( 24.43us)         4\n",
      "  nlp_hess_l  |   1.59 s (795.84ms)   1.59 s (796.01ms)         2\n",
      "   nlp_jac_g  | 153.51ms ( 38.38ms) 153.60ms ( 38.40ms)         4\n",
      "       total  |   1.76 s (  1.76 s)   1.76 s (  1.76 s)         1\n",
      "Solver fails under iter 2 return last iteration results!\n",
      "Setting the init for x\n",
      "Settiing the init for u\n",
      "      solver  :   t_proc      (avg)   t_wall      (avg)    n_eval\n",
      "       nlp_f  |  49.00us ( 16.33us)  45.77us ( 15.26us)         3\n",
      "       nlp_g  |   5.84ms (  1.95ms)   5.84ms (  1.95ms)         3\n",
      "  nlp_grad_f  | 101.00us ( 25.25us) 100.95us ( 25.24us)         4\n",
      "  nlp_hess_l  |   1.60 s (798.89ms)   1.60 s (798.95ms)         2\n",
      "   nlp_jac_g  | 153.10ms ( 38.27ms) 153.15ms ( 38.29ms)         4\n",
      "       total  |   1.76 s (  1.76 s)   1.76 s (  1.76 s)         1\n",
      "Solver fails under iter 2 return last iteration results!\n",
      "Setting the init for x\n",
      "Settiing the init for u\n",
      "      solver  :   t_proc      (avg)   t_wall      (avg)    n_eval\n",
      "       nlp_f  |  53.00us ( 17.67us)  47.84us ( 15.95us)         3\n",
      "       nlp_g  |   5.97ms (  1.99ms)   5.98ms (  1.99ms)         3\n",
      "  nlp_grad_f  | 104.00us ( 26.00us) 103.77us ( 25.94us)         4\n",
      "  nlp_hess_l  |   1.60 s (799.72ms)   1.60 s (800.66ms)         2\n",
      "   nlp_jac_g  | 153.59ms ( 38.40ms) 153.72ms ( 38.43ms)         4\n",
      "       total  |   1.76 s (  1.76 s)   1.77 s (  1.77 s)         1\n",
      "Solver fails under iter 2 return last iteration results!\n",
      "Setting the init for x\n",
      "Settiing the init for u\n",
      "      solver  :   t_proc      (avg)   t_wall      (avg)    n_eval\n",
      "       nlp_f  |  48.00us ( 16.00us)  44.45us ( 14.82us)         3\n",
      "       nlp_g  |   5.56ms (  1.85ms)   5.57ms (  1.86ms)         3\n",
      "  nlp_grad_f  |  95.00us ( 23.75us)  94.17us ( 23.54us)         4\n",
      "  nlp_hess_l  |   1.60 s (798.01ms)   1.60 s (798.02ms)         2\n",
      "   nlp_jac_g  | 144.35ms ( 36.09ms) 144.44ms ( 36.11ms)         4\n",
      "       total  |   1.75 s (  1.75 s)   1.75 s (  1.75 s)         1\n",
      "Solver fails under iter 2 return last iteration results!\n",
      "Setting the init for x\n",
      "Settiing the init for u\n",
      "      solver  :   t_proc      (avg)   t_wall      (avg)    n_eval\n",
      "       nlp_f  |  54.00us ( 18.00us)  48.65us ( 16.22us)         3\n",
      "       nlp_g  |   5.67ms (  1.89ms)   5.66ms (  1.89ms)         3\n",
      "  nlp_grad_f  | 100.00us ( 25.00us)  99.39us ( 24.85us)         4\n",
      "  nlp_hess_l  |   1.60 s (801.86ms)   1.60 s (801.85ms)         2\n",
      "   nlp_jac_g  | 148.82ms ( 37.20ms) 148.92ms ( 37.23ms)         4\n",
      "       total  |   1.76 s (  1.76 s)   1.76 s (  1.76 s)         1\n",
      "Solver fails under iter 2 return last iteration results!\n",
      "Setting the init for x\n",
      "Settiing the init for u\n",
      "      solver  :   t_proc      (avg)   t_wall      (avg)    n_eval\n",
      "       nlp_f  |  54.00us ( 18.00us)  48.15us ( 16.05us)         3\n",
      "       nlp_g  |   5.81ms (  1.94ms)   5.82ms (  1.94ms)         3\n",
      "  nlp_grad_f  | 104.00us ( 26.00us) 103.94us ( 25.99us)         4\n",
      "  nlp_hess_l  |   1.60 s (799.87ms)   1.60 s (799.86ms)         2\n",
      "   nlp_jac_g  | 152.95ms ( 38.24ms) 152.99ms ( 38.25ms)         4\n",
      "       total  |   1.76 s (  1.76 s)   1.76 s (  1.76 s)         1\n",
      "Solver fails under iter 2 return last iteration results!\n",
      "Setting the init for x\n",
      "Settiing the init for u\n",
      "      solver  :   t_proc      (avg)   t_wall      (avg)    n_eval\n",
      "       nlp_f  |  47.00us ( 15.67us)  45.13us ( 15.04us)         3\n",
      "       nlp_g  |   5.84ms (  1.95ms)   5.84ms (  1.95ms)         3\n",
      "  nlp_grad_f  | 104.00us ( 26.00us) 103.69us ( 25.92us)         4\n",
      "  nlp_hess_l  |   1.59 s (794.56ms)   1.59 s (794.67ms)         2\n",
      "   nlp_jac_g  | 153.44ms ( 38.36ms) 153.53ms ( 38.38ms)         4\n",
      "       total  |   1.75 s (  1.75 s)   1.75 s (  1.75 s)         1\n",
      "Solver fails under iter 2 return last iteration results!\n",
      "Setting the init for x\n",
      "Settiing the init for u\n",
      "      solver  :   t_proc      (avg)   t_wall      (avg)    n_eval\n",
      "       nlp_f  |  52.00us ( 17.33us)  47.58us ( 15.86us)         3\n",
      "       nlp_g  |   5.79ms (  1.93ms)   5.79ms (  1.93ms)         3\n",
      "  nlp_grad_f  | 102.00us ( 25.50us) 101.51us ( 25.38us)         4\n",
      "  nlp_hess_l  |   1.61 s (805.17ms)   1.61 s (805.21ms)         2\n",
      "   nlp_jac_g  | 146.39ms ( 36.60ms) 146.45ms ( 36.61ms)         4\n",
      "       total  |   1.77 s (  1.77 s)   1.77 s (  1.77 s)         1\n",
      "Solver fails under iter 2 return last iteration results!\n",
      "Setting the init for x\n",
      "Settiing the init for u\n",
      "      solver  :   t_proc      (avg)   t_wall      (avg)    n_eval\n",
      "       nlp_f  |  54.00us ( 18.00us)  47.82us ( 15.94us)         3\n",
      "       nlp_g  |   5.83ms (  1.94ms)   5.84ms (  1.95ms)         3\n",
      "  nlp_grad_f  | 104.00us ( 26.00us) 105.16us ( 26.29us)         4\n",
      "  nlp_hess_l  |   1.62 s (810.88ms)   1.62 s (810.91ms)         2\n",
      "   nlp_jac_g  | 151.99ms ( 38.00ms) 152.03ms ( 38.01ms)         4\n",
      "       total  |   1.78 s (  1.78 s)   1.78 s (  1.78 s)         1\n",
      "Solver fails under iter 2 return last iteration results!\n",
      "Setting the init for x\n",
      "Settiing the init for u\n",
      "      solver  :   t_proc      (avg)   t_wall      (avg)    n_eval\n",
      "       nlp_f  |  54.00us ( 18.00us)  48.42us ( 16.14us)         3\n",
      "       nlp_g  |   5.71ms (  1.90ms)   5.72ms (  1.91ms)         3\n",
      "  nlp_grad_f  |  99.00us ( 24.75us)  99.00us ( 24.75us)         4\n",
      "  nlp_hess_l  |   1.59 s (794.98ms)   1.59 s (795.04ms)         2\n",
      "   nlp_jac_g  | 151.85ms ( 37.96ms) 151.89ms ( 37.97ms)         4\n",
      "       total  |   1.75 s (  1.75 s)   1.75 s (  1.75 s)         1\n",
      "Solver fails under iter 2 return last iteration results!\n",
      "Setting the init for x\n",
      "Settiing the init for u\n",
      "      solver  :   t_proc      (avg)   t_wall      (avg)    n_eval\n",
      "       nlp_f  |  57.00us ( 19.00us)  51.20us ( 17.07us)         3\n",
      "       nlp_g  |   5.76ms (  1.92ms)   5.77ms (  1.92ms)         3\n",
      "  nlp_grad_f  | 101.00us ( 25.25us) 101.69us ( 25.42us)         4\n",
      "  nlp_hess_l  |   1.59 s (796.37ms)   1.59 s (796.40ms)         2\n",
      "   nlp_jac_g  | 152.40ms ( 38.10ms) 152.43ms ( 38.11ms)         4\n",
      "       total  |   1.76 s (  1.76 s)   1.76 s (  1.76 s)         1\n",
      "Solver fails under iter 2 return last iteration results!\n",
      "Setting the init for x\n",
      "Settiing the init for u\n",
      "      solver  :   t_proc      (avg)   t_wall      (avg)    n_eval\n",
      "       nlp_f  |  52.00us ( 17.33us)  47.55us ( 15.85us)         3\n",
      "       nlp_g  |   5.75ms (  1.92ms)   5.76ms (  1.92ms)         3\n",
      "  nlp_grad_f  | 101.00us ( 25.25us) 101.56us ( 25.39us)         4\n",
      "  nlp_hess_l  |   1.60 s (799.26ms)   1.60 s (799.78ms)         2\n",
      "   nlp_jac_g  | 153.15ms ( 38.29ms) 153.27ms ( 38.32ms)         4\n",
      "       total  |   1.76 s (  1.76 s)   1.76 s (  1.76 s)         1\n",
      "Solver fails under iter 2 return last iteration results!\n",
      "Setting the init for x\n",
      "Settiing the init for u\n",
      "      solver  :   t_proc      (avg)   t_wall      (avg)    n_eval\n",
      "       nlp_f  |  57.00us ( 19.00us)  50.79us ( 16.93us)         3\n",
      "       nlp_g  |   6.00ms (  2.00ms)   6.01ms (  2.00ms)         3\n",
      "  nlp_grad_f  | 103.00us ( 25.75us) 102.84us ( 25.71us)         4\n",
      "  nlp_hess_l  |   1.65 s (825.83ms)   1.65 s (826.37ms)         2\n",
      "   nlp_jac_g  | 156.03ms ( 39.01ms) 156.17ms ( 39.04ms)         4\n",
      "       total  |   1.82 s (  1.82 s)   1.82 s (  1.82 s)         1\n",
      "Solver fails under iter 2 return last iteration results!\n",
      "Setting the init for x\n",
      "Settiing the init for u\n",
      "      solver  :   t_proc      (avg)   t_wall      (avg)    n_eval\n",
      "       nlp_f  |  50.00us ( 16.67us)  46.82us ( 15.61us)         3\n",
      "       nlp_g  |   5.89ms (  1.96ms)   5.89ms (  1.96ms)         3\n",
      "  nlp_grad_f  | 106.00us ( 26.50us) 107.25us ( 26.81us)         4\n",
      "  nlp_hess_l  |   1.63 s (816.73ms)   1.63 s (816.01ms)         2\n",
      "   nlp_jac_g  | 155.34ms ( 38.84ms) 155.38ms ( 38.85ms)         4\n",
      "       total  |   1.80 s (  1.80 s)   1.80 s (  1.80 s)         1\n",
      "Solver fails under iter 2 return last iteration results!\n",
      "Setting the init for x\n",
      "Settiing the init for u\n",
      "      solver  :   t_proc      (avg)   t_wall      (avg)    n_eval\n",
      "       nlp_f  |  47.00us ( 15.67us)  43.94us ( 14.65us)         3\n",
      "       nlp_g  |   5.95ms (  1.98ms)   5.95ms (  1.98ms)         3\n",
      "  nlp_grad_f  | 104.00us ( 26.00us) 102.59us ( 25.65us)         4\n",
      "  nlp_hess_l  |   1.61 s (804.54ms)   1.61 s (804.60ms)         2\n",
      "   nlp_jac_g  | 152.26ms ( 38.06ms) 152.31ms ( 38.08ms)         4\n",
      "       total  |   1.77 s (  1.77 s)   1.77 s (  1.77 s)         1\n",
      "Solver fails under iter 2 return last iteration results!\n",
      "Setting the init for x\n",
      "Settiing the init for u\n",
      "      solver  :   t_proc      (avg)   t_wall      (avg)    n_eval\n",
      "       nlp_f  |  48.00us ( 16.00us)  44.20us ( 14.73us)         3\n",
      "       nlp_g  |   5.92ms (  1.97ms)   5.93ms (  1.98ms)         3\n",
      "  nlp_grad_f  | 102.00us ( 25.50us) 101.63us ( 25.41us)         4\n",
      "  nlp_hess_l  |   1.61 s (805.51ms)   1.61 s (806.23ms)         2\n",
      "   nlp_jac_g  | 158.20ms ( 39.55ms) 158.26ms ( 39.56ms)         4\n",
      "       total  |   1.78 s (  1.78 s)   1.78 s (  1.78 s)         1\n",
      "Solver fails under iter 2 return last iteration results!\n",
      "Setting the init for x\n",
      "Settiing the init for u\n",
      "      solver  :   t_proc      (avg)   t_wall      (avg)    n_eval\n",
      "       nlp_f  |  47.00us ( 15.67us)  44.57us ( 14.86us)         3\n",
      "       nlp_g  |   5.79ms (  1.93ms)   5.80ms (  1.93ms)         3\n",
      "  nlp_grad_f  |  92.00us ( 23.00us)  93.22us ( 23.31us)         4\n",
      "  nlp_hess_l  |   1.57 s (785.47ms)   1.57 s (785.57ms)         2\n",
      "   nlp_jac_g  | 150.98ms ( 37.75ms) 151.03ms ( 37.76ms)         4\n",
      "       total  |   1.73 s (  1.73 s)   1.73 s (  1.73 s)         1\n",
      "Solver fails under iter 2 return last iteration results!\n",
      "Setting the init for x\n",
      "Settiing the init for u\n"
     ]
    }
   ],
   "source": [
    "T = 50\n",
    "\n",
    "x0 = np.array([0, np.pi, 0, 0])\n",
    "initial_guess = {\"x\": np.swapaxes(np.linspace(x0, x_target, T+1), 0, 1)}\n",
    "\n",
    "# obtain the first result\n",
    "res = solve_mpc_sub_loop(x0=x0, cost_fn=cost_fn, init_guess=initial_guess, T=50)\n",
    "\n",
    "frames = []\n",
    "# mpc loop\n",
    "for i in range(100):\n",
    "    # execute the first control at solution\n",
    "    x0 = mujoco_dyanmics(x0, res[\"u\"][0]).full().flatten()\n",
    "\n",
    "    # update initial guess\n",
    "    initial_guess = update_init_guess(res)\n",
    "    # solving sub-prob for new initial condition\n",
    "    res = solve_mpc_sub_loop(x0=x0, cost_fn=cost_fn, init_guess=initial_guess, T=50, max_iter=2)\n",
    "\n",
    "    # visualization\n",
    "    data.qpos = x0[:2]\n",
    "    data.qvel = x0[2:]\n",
    "    mujoco.mj_forward(model, data)\n",
    "    renderer.update_scene(data)\n",
    "    pixels = renderer.render()\n",
    "    frames.append(pixels)\n",
    "\n",
    "media.show_video(frames, fps=1/0.02)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### MPC with SNOPT"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Setting the init for x\n",
      " ==============================\n",
      "    SNOPT  C interface  2.2.0   \n",
      " ==============================\n",
      " S N O P T  7.7.7    (Feb 2021)\n",
      " ==============================\n",
      "\n",
      " SNMEMB EXIT 100 -- finished successfully\n",
      " SNMEMB INFO 104 -- memory requirements estimated\n",
      "\n",
      " Trial version of SNOPT -- for evaluation or academic purposes only\n",
      "\n",
      "\n",
      "\n",
      " Nonlinear constraints     304     Linear constraints       0\n",
      " Nonlinear variables       254     Linear variables         0\n",
      " Jacobian  variables       254     Objective variables    254\n",
      " Total constraints         304     Total variables        254\n",
      "\n",
      "\n",
      "\n",
      " The user has defined    1304   out of    1304   constraint gradients.\n",
      " The user has defined     254   out of     254   objective  gradients.\n",
      "\n",
      "\n",
      " Major Minors     Step   nCon Feasible  Optimal  MeritFunction     nS Penalty\n",
      "     0     77               1  1.4E-01  2.4E-02  1.6946111E+02     34           r\n",
      "     1      8  2.0E-01      2  1.2E-01  2.1E-02 -7.1242571E+03     29 1.7E+04   rl\n",
      "     2     11  2.2E-01      3  9.8E-02  3.8E-02 -5.4218832E+03     33 1.7E+04 s  l\n",
      "     3     19  1.0E+00      5  7.1E-02  1.0E+00  2.2989238E+02     31 4.7E+02  m\n",
      "     4     17  1.0E+00      7  1.3E-01  4.3E-01  9.0785556E+02     28 9.0E+01  m\n",
      "     5      8  8.6E-01     10  2.5E-01  4.8E-01  4.9898237E+02     25 1.2E+02  m\n",
      "     6     20  1.0E+00     11  6.4E-02  2.9E-01  6.9743026E+02     14 8.2E+01\n",
      "     7     16  1.0E+00     12  7.5E-02  7.9E-02  7.8505028E+02     13 8.2E+01\n",
      "     8     15  1.0E+00     14  4.4E-02  4.1E-02  8.8184481E+02     17 8.2E+01  m\n",
      "     9      9  1.0E+00     15  2.1E-02  1.3E-01  9.1856428E+02     17 8.2E+01\n",
      "\n",
      " Major Minors     Step   nCon Feasible  Optimal  MeritFunction     nS Penalty\n",
      "    10      5  1.0E+00     17  1.3E-02  1.5E-01  9.5717503E+02     17 8.2E+01  m\n",
      "    11      7  1.0E+00     19  1.7E-02  9.6E-02  1.0061853E+03     15 8.2E+01  m\n",
      "    12      5  1.0E+00     21  2.4E-02  1.5E-02  1.0413590E+03     15 8.2E+01  MR\n",
      "    13     15  1.0E+00     23  6.0E-03  4.0E-03  1.0625238E+03     13 8.2E+01 sm\n",
      "    14      9  1.0E+00     25  1.5E-01  3.2E-02  1.1704867E+03      9 8.2E+01  m\n",
      "    15     10  1.0E+00     27  1.5E-01  2.7E-02  1.2358764E+03      6 8.2E+01  M\n",
      "    16      8  1.0E+00     29  2.0E-01  1.7E-02  1.2974631E+03      2 8.2E+01  m\n",
      "    17      2  1.0E+00     30  8.8E-02  5.4E-02  1.3571858E+03      1 8.2E+01\n",
      "    18      2  1.0E+00     31  8.9E-04  3.4E-03  1.3696477E+03      2 8.2E+01\n",
      "    19      2  1.0E+00     33  1.6E-03  6.0E-04  1.3698381E+03      1 8.2E+01  m\n",
      "\n",
      " Major Minors     Step   nCon Feasible  Optimal  MeritFunction     nS Penalty\n",
      "    20      1  1.0E+00     34  8.4E-04  2.1E-05  1.3732521E+03      1 8.2E+01\n",
      "    21      1  1.0E+00     36 (1.2E-07) 2.9E-05  1.3732552E+03      1 8.2E+01\n",
      "    22      1  1.0E+00     38 (1.5E-08) 1.3E-05  1.3732584E+03      1 8.2E+01   R\n",
      "    23      1  1.0E+00     40 (1.6E-08) 1.3E-05  1.3732617E+03      1 8.2E+01   R\n",
      "    24      1  1.0E+00     42 (1.6E-08) 1.3E-05  1.3732652E+03      1           r\n",
      "    25      1  1.0E+00     44  3.9E-05  1.7E-05  1.3735216E+03                  r\n",
      "    26      0  1.0E+00     45  2.2E-05 (1.0E-10) 1.3738281E+03                s\n",
      "    27      0  1.0E+00     46 (2.4E-14)(1.7E-13) 1.3738281E+03        3.5E+01\n",
      "\n",
      " SNOPTC EXIT   0 -- finished successfully\n",
      " SNOPTC INFO   1 -- optimality conditions satisfied\n",
      "\n",
      " Problem name                 solver\n",
      " No. of iterations                 271   Objective            1.3738280893E+03\n",
      " No. of major iterations            27   Linear    obj. term  0.0000000000E+00\n",
      " Penalty parameter           3.517E+01   Nonlinear obj. term  1.3738280893E+03\n",
      " User function calls (total)        47\n",
      " No. of degenerate steps             0   Percentage                       0.00\n",
      " Max x                     204 1.1E+01   Max pi                    166 4.4E+03\n",
      " Max Primal infeas         372 2.7E-13   Max Dual infeas            50 4.1E-13\n",
      " Nonlinear constraint violn    2.7E-13\n",
      "\n",
      "\n",
      "\n",
      " Solution printed on file  10\n",
      "      solver  :   t_proc      (avg)   t_wall      (avg)    n_eval\n",
      "   nlp_jac_f  |   2.25ms ( 46.00us)   1.88ms ( 38.34us)        49\n",
      "   nlp_jac_g  |   1.78 s ( 36.24ms)   1.77 s ( 36.04ms)        49\n",
      "       total  |   1.79 s (  1.79 s)   1.78 s (  1.78 s)         1\n",
      "Solve successfully\n",
      "\n",
      " Time for MPS input                             0.00 seconds\n",
      " Time for solving problem                       1.71 seconds\n",
      " Time for solution output                       0.00 seconds\n",
      " Time for constraint functions                  1.73 seconds\n",
      " Time for objective function                    0.00 seconds\n",
      "Setting the init for x\n",
      "Settiing the init for u\n",
      " ==============================\n",
      "    SNOPT  C interface  2.2.0   \n",
      " ==============================\n",
      " S N O P T  7.7.7    (Feb 2021)\n",
      " ==============================\n",
      "\n",
      " SNMEMB EXIT 100 -- finished successfully\n",
      " SNMEMB INFO 104 -- memory requirements estimated\n",
      "\n",
      " Trial version of SNOPT -- for evaluation or academic purposes only\n",
      "\n",
      "\n",
      "\n",
      " Nonlinear constraints     304     Linear constraints       0\n",
      " Nonlinear variables       254     Linear variables         0\n",
      " Jacobian  variables       254     Objective variables    254\n",
      " Total constraints         304     Total variables        254\n",
      "\n",
      "\n",
      "\n",
      " The user has defined    1304   out of    1304   constraint gradients.\n",
      " The user has defined     254   out of     254   objective  gradients.\n",
      "\n",
      "\n",
      " Major Minors     Step   nCon Feasible  Optimal  MeritFunction     nS Penalty\n",
      "     0     27               1 (2.4E-14)(2.5E-13) 1.4257222E+03                  r\n",
      "\n",
      " SNOPTC EXIT   0 -- finished successfully\n",
      " SNOPTC INFO   1 -- optimality conditions satisfied\n",
      "\n",
      " Problem name                 solver\n",
      " No. of iterations                  27   Objective            1.4257221551E+03\n",
      " No. of major iterations             0   Linear    obj. term  0.0000000000E+00\n",
      " Penalty parameter           0.000E+00   Nonlinear obj. term  1.4257221551E+03\n",
      " User function calls (total)         2\n",
      " No. of degenerate steps            25   Percentage                      92.59\n",
      " Max x                     204 1.1E+01   Max pi                    162 4.8E+03\n",
      " Max Primal infeas         368 2.7E-13   Max Dual infeas           131 1.2E-09\n",
      " Nonlinear constraint violn    2.7E-13\n",
      "\n",
      "\n",
      "\n",
      " Solution printed on file  10\n",
      "      solver  :   t_proc      (avg)   t_wall      (avg)    n_eval\n",
      "   nlp_jac_f  | 172.00us ( 43.00us) 133.92us ( 33.48us)         4\n",
      "   nlp_jac_g  | 156.33ms ( 39.08ms) 147.52ms ( 36.88ms)         4\n",
      "       total  | 160.05ms (160.05ms) 151.13ms (151.13ms)         1\n",
      "Solve successfully\n",
      "\n",
      " Time for MPS input                             0.00 seconds\n",
      " Time for solving problem                       0.08 seconds\n",
      " Time for solution output                       0.00 seconds\n",
      " Time for constraint functions                  0.11 seconds\n",
      " Time for objective function                    0.00 seconds\n",
      "Setting the init for x\n",
      "Settiing the init for u\n",
      " ==============================\n",
      "    SNOPT  C interface  2.2.0   \n",
      " ==============================\n",
      " S N O P T  7.7.7    (Feb 2021)\n",
      " ==============================\n",
      "\n",
      " SNMEMB EXIT 100 -- finished successfully\n",
      " SNMEMB INFO 104 -- memory requirements estimated\n",
      "\n",
      " Trial version of SNOPT -- for evaluation or academic purposes only\n",
      "\n",
      "\n",
      "\n",
      " Nonlinear constraints     304     Linear constraints       0\n",
      " Nonlinear variables       254     Linear variables         0\n",
      " Jacobian  variables       254     Objective variables    254\n",
      " Total constraints         304     Total variables        254\n",
      "\n",
      "\n",
      "\n",
      " The user has defined    1304   out of    1304   constraint gradients.\n",
      " The user has defined     254   out of     254   objective  gradients.\n",
      "\n",
      "\n",
      " Major Minors     Step   nCon Feasible  Optimal  MeritFunction     nS Penalty\n",
      "     0     26               1 (2.4E-14)(1.7E-13) 1.4810693E+03                  r\n",
      "\n",
      " SNOPTC EXIT   0 -- finished successfully\n",
      " SNOPTC INFO   1 -- optimality conditions satisfied\n",
      "\n",
      " Problem name                 solver\n",
      " No. of iterations                  26   Objective            1.4810693275E+03\n",
      " No. of major iterations             0   Linear    obj. term  0.0000000000E+00\n",
      " Penalty parameter           0.000E+00   Nonlinear obj. term  1.4810693275E+03\n",
      " User function calls (total)         2\n",
      " No. of degenerate steps            24   Percentage                      92.31\n",
      " Max x                     204 1.1E+01   Max pi                    158 5.3E+03\n",
      " Max Primal infeas         364 2.7E-13   Max Dual infeas           168 7.0E-10\n",
      " Nonlinear constraint violn    2.7E-13\n",
      "\n",
      "\n",
      "\n",
      " Solution printed on file  10\n",
      "      solver  :   t_proc      (avg)   t_wall      (avg)    n_eval\n",
      "   nlp_jac_f  | 158.00us ( 39.50us) 123.53us ( 30.88us)         4\n",
      "   nlp_jac_g  | 138.84ms ( 34.71ms) 138.85ms ( 34.71ms)         4\n",
      "       total  | 142.36ms (142.36ms) 142.25ms (142.25ms)         1\n",
      "Solve successfully\n",
      "\n",
      " Time for MPS input                             0.00 seconds\n",
      " Time for solving problem                       0.07 seconds\n",
      " Time for solution output                       0.00 seconds\n",
      " Time for constraint functions                  0.10 seconds\n",
      " Time for objective function                    0.00 seconds\n",
      "Setting the init for x\n",
      "Settiing the init for u\n",
      " ==============================\n",
      "    SNOPT  C interface  2.2.0   \n",
      " ==============================\n",
      " S N O P T  7.7.7    (Feb 2021)\n",
      " ==============================\n",
      "\n",
      " SNMEMB EXIT 100 -- finished successfully\n",
      " SNMEMB INFO 104 -- memory requirements estimated\n",
      "\n",
      " Trial version of SNOPT -- for evaluation or academic purposes only\n",
      "\n",
      "\n",
      "\n",
      " Nonlinear constraints     304     Linear constraints       0\n",
      " Nonlinear variables       254     Linear variables         0\n",
      " Jacobian  variables       254     Objective variables    254\n",
      " Total constraints         304     Total variables        254\n",
      "\n",
      "\n",
      "\n",
      " The user has defined    1304   out of    1304   constraint gradients.\n",
      " The user has defined     254   out of     254   objective  gradients.\n",
      "\n",
      "\n",
      " Major Minors     Step   nCon Feasible  Optimal  MeritFunction     nS Penalty\n",
      "     0     27               1 (2.4E-14)(1.7E-13) 1.5398113E+03                  r\n",
      "\n",
      " SNOPTC EXIT   0 -- finished successfully\n",
      " SNOPTC INFO   1 -- optimality conditions satisfied\n",
      "\n",
      " Problem name                 solver\n",
      " No. of iterations                  27   Objective            1.5398112785E+03\n",
      " No. of major iterations             0   Linear    obj. term  0.0000000000E+00\n",
      " Penalty parameter           0.000E+00   Nonlinear obj. term  1.5398112785E+03\n",
      " User function calls (total)         2\n",
      " No. of degenerate steps            25   Percentage                      92.59\n",
      " Max x                     200 1.1E+01   Max pi                    154 5.8E+03\n",
      " Max Primal infeas         360 2.7E-13   Max Dual infeas           164 7.1E-10\n",
      " Nonlinear constraint violn    2.7E-13\n",
      "\n",
      "\n",
      "\n",
      " Solution printed on file  10\n",
      "      solver  :   t_proc      (avg)   t_wall      (avg)    n_eval\n",
      "   nlp_jac_f  | 147.00us ( 36.75us) 141.75us ( 35.44us)         4\n",
      "   nlp_jac_g  | 148.65ms ( 37.16ms) 146.33ms ( 36.58ms)         4\n",
      "       total  | 152.43ms (152.43ms) 149.99ms (149.99ms)         1\n",
      "Solve successfully\n",
      "\n",
      " Time for MPS input                             0.00 seconds\n",
      " Time for solving problem                       0.07 seconds\n",
      " Time for solution output                       0.00 seconds\n",
      " Time for constraint functions                  0.11 seconds\n",
      " Time for objective function                    0.00 seconds\n",
      "Setting the init for x\n",
      "Settiing the init for u\n",
      " ==============================\n",
      "    SNOPT  C interface  2.2.0   \n",
      " ==============================\n",
      " S N O P T  7.7.7    (Feb 2021)\n",
      " ==============================\n",
      "\n",
      " SNMEMB EXIT 100 -- finished successfully\n",
      " SNMEMB INFO 104 -- memory requirements estimated\n",
      "\n",
      " Trial version of SNOPT -- for evaluation or academic purposes only\n",
      "\n",
      "\n",
      "\n",
      " Nonlinear constraints     304     Linear constraints       0\n",
      " Nonlinear variables       254     Linear variables         0\n",
      " Jacobian  variables       254     Objective variables    254\n",
      " Total constraints         304     Total variables        254\n",
      "\n",
      "\n",
      "\n",
      " The user has defined    1304   out of    1304   constraint gradients.\n",
      " The user has defined     254   out of     254   objective  gradients.\n",
      "\n",
      "\n",
      " Major Minors     Step   nCon Feasible  Optimal  MeritFunction     nS Penalty\n",
      "     0     27               1 (2.4E-14)(2.2E-13) 1.6018635E+03                  r\n",
      "\n",
      " SNOPTC EXIT   0 -- finished successfully\n",
      " SNOPTC INFO   1 -- optimality conditions satisfied\n",
      "\n",
      " Problem name                 solver\n",
      " No. of iterations                  27   Objective            1.6018635350E+03\n",
      " No. of major iterations             0   Linear    obj. term  0.0000000000E+00\n",
      " Penalty parameter           0.000E+00   Nonlinear obj. term  1.6018635350E+03\n",
      " User function calls (total)         2\n",
      " No. of degenerate steps            27   Percentage                     100.00\n",
      " Max x                     196 1.1E+01   Max pi                    150 6.3E+03\n",
      " Max Primal infeas         256 2.7E-13   Max Dual infeas            87 1.4E-09\n",
      " Nonlinear constraint violn    2.7E-13\n",
      "\n",
      "\n",
      "\n",
      " Solution printed on file  10\n",
      "      solver  :   t_proc      (avg)   t_wall      (avg)    n_eval\n",
      "   nlp_jac_f  | 176.00us ( 44.00us) 138.15us ( 34.54us)         4\n",
      "   nlp_jac_g  | 149.33ms ( 37.33ms) 149.13ms ( 37.28ms)         4\n",
      "       total  | 153.08ms (153.08ms) 152.73ms (152.73ms)         1\n",
      "Solve successfully\n",
      "\n",
      " Time for MPS input                             0.00 seconds\n",
      " Time for solving problem                       0.08 seconds\n",
      " Time for solution output                       0.00 seconds\n",
      " Time for constraint functions                  0.11 seconds\n",
      " Time for objective function                    0.00 seconds\n",
      "Setting the init for x\n",
      "Settiing the init for u\n",
      " ==============================\n",
      "    SNOPT  C interface  2.2.0   \n",
      " ==============================\n",
      " S N O P T  7.7.7    (Feb 2021)\n",
      " ==============================\n",
      "\n",
      " SNMEMB EXIT 100 -- finished successfully\n",
      " SNMEMB INFO 104 -- memory requirements estimated\n",
      "\n",
      " Trial version of SNOPT -- for evaluation or academic purposes only\n",
      "\n",
      "\n",
      "\n",
      " Nonlinear constraints     304     Linear constraints       0\n",
      " Nonlinear variables       254     Linear variables         0\n",
      " Jacobian  variables       254     Objective variables    254\n",
      " Total constraints         304     Total variables        254\n",
      "\n",
      "\n",
      "\n",
      " The user has defined    1304   out of    1304   constraint gradients.\n",
      " The user has defined     254   out of     254   objective  gradients.\n",
      "\n",
      "\n",
      " Major Minors     Step   nCon Feasible  Optimal  MeritFunction     nS Penalty\n",
      "     0     27               1 (2.3E-14)(1.4E-13) 1.6670911E+03                  r\n",
      "\n",
      " SNOPTC EXIT   0 -- finished successfully\n",
      " SNOPTC INFO   1 -- optimality conditions satisfied\n",
      "\n",
      " Problem name                 solver\n",
      " No. of iterations                  27   Objective            1.6670911189E+03\n",
      " No. of major iterations             0   Linear    obj. term  0.0000000000E+00\n",
      " Penalty parameter           0.000E+00   Nonlinear obj. term  1.6670911189E+03\n",
      " User function calls (total)         2\n",
      " No. of degenerate steps            26   Percentage                      96.30\n",
      " Max x                     192 1.1E+01   Max pi                    146 6.8E+03\n",
      " Max Primal infeas         256 2.6E-13   Max Dual infeas           191 8.3E-10\n",
      " Nonlinear constraint violn    2.6E-13\n",
      "\n",
      "\n",
      "\n",
      " Solution printed on file  10\n",
      "      solver  :   t_proc      (avg)   t_wall      (avg)    n_eval\n",
      "   nlp_jac_f  | 134.00us ( 33.50us) 128.03us ( 32.01us)         4\n",
      "   nlp_jac_g  | 148.18ms ( 37.05ms) 146.89ms ( 36.72ms)         4\n",
      "       total  | 151.88ms (151.88ms) 150.47ms (150.47ms)         1\n",
      "Solve successfully\n",
      "\n",
      " Time for MPS input                             0.00 seconds\n",
      " Time for solving problem                       0.07 seconds\n",
      " Time for solution output                       0.00 seconds\n",
      " Time for constraint functions                  0.11 seconds\n",
      " Time for objective function                    0.00 seconds\n",
      "Setting the init for x\n",
      "Settiing the init for u\n",
      " ==============================\n",
      "    SNOPT  C interface  2.2.0   \n",
      " ==============================\n",
      " S N O P T  7.7.7    (Feb 2021)\n",
      " ==============================\n",
      "\n",
      " SNMEMB EXIT 100 -- finished successfully\n",
      " SNMEMB INFO 104 -- memory requirements estimated\n",
      "\n",
      " Trial version of SNOPT -- for evaluation or academic purposes only\n",
      "\n",
      "\n",
      "\n",
      " Nonlinear constraints     304     Linear constraints       0\n",
      " Nonlinear variables       254     Linear variables         0\n",
      " Jacobian  variables       254     Objective variables    254\n",
      " Total constraints         304     Total variables        254\n",
      "\n",
      "\n",
      "\n",
      " The user has defined    1304   out of    1304   constraint gradients.\n",
      " The user has defined     254   out of     254   objective  gradients.\n",
      "\n",
      "\n",
      " Major Minors     Step   nCon Feasible  Optimal  MeritFunction     nS Penalty\n",
      "     0     30               1 (4.6E-14) 6.3E-06  1.7352806E+03      2           r\n",
      "     1      2  1.0E+00      2  8.7E-06  1.1E-05  1.7352809E+03                  r\n",
      "     2      0  1.7E-01      4  6.4E-05  1.0E-02  1.7356123E+03                sm l\n",
      "     3      1  1.0E+00      5  1.3E-03  1.7E-04  1.7380066E+03      1          m\n",
      "     4      1  1.0E+00      7  3.4E-05 (8.5E-07) 1.7380065E+03        4.5E+00  m\n",
      "     5      0  1.0E+00      9 (5.2E-13)(8.5E-07) 1.7380067E+03        2.1E+00\n",
      "\n",
      " SNOPTC EXIT   0 -- finished successfully\n",
      " SNOPTC INFO   1 -- optimality conditions satisfied\n",
      "\n",
      " Problem name                 solver\n",
      " No. of iterations                  34   Objective            1.7380066785E+03\n",
      " No. of major iterations             5   Linear    obj. term  0.0000000000E+00\n",
      " Penalty parameter           2.146E+00   Nonlinear obj. term  1.7380066785E+03\n",
      " User function calls (total)        10\n",
      " No. of degenerate steps            25   Percentage                      73.53\n",
      " Max x                     196 1.3E+01   Max pi                    142 7.6E+03\n",
      " Max Primal infeas         558 6.6E-12   Max Dual infeas           307 6.4E-03\n",
      " Nonlinear constraint violn    6.6E-12\n",
      "\n",
      "\n",
      "\n",
      " Solution printed on file  10\n",
      "      solver  :   t_proc      (avg)   t_wall      (avg)    n_eval\n",
      "   nlp_jac_f  | 520.00us ( 43.33us) 434.67us ( 36.22us)        12\n",
      "   nlp_jac_g  | 444.97ms ( 37.08ms) 437.52ms ( 36.46ms)        12\n",
      "       total  | 450.62ms (450.62ms) 442.89ms (442.89ms)         1\n",
      "Solve successfully\n",
      "\n",
      " Time for MPS input                             0.00 seconds\n",
      " Time for solving problem                       0.37 seconds\n",
      " Time for solution output                       0.00 seconds\n",
      " Time for constraint functions                  0.40 seconds\n",
      " Time for objective function                    0.00 seconds\n",
      "Setting the init for x\n",
      "Settiing the init for u\n",
      " ==============================\n",
      "    SNOPT  C interface  2.2.0   \n",
      " ==============================\n",
      " S N O P T  7.7.7    (Feb 2021)\n",
      " ==============================\n",
      "\n",
      " SNMEMB EXIT 100 -- finished successfully\n",
      " SNMEMB INFO 104 -- memory requirements estimated\n",
      "\n",
      " Trial version of SNOPT -- for evaluation or academic purposes only\n",
      "\n",
      "\n",
      "\n",
      " Nonlinear constraints     304     Linear constraints       0\n",
      " Nonlinear variables       254     Linear variables         0\n",
      " Jacobian  variables       254     Objective variables    254\n",
      " Total constraints         304     Total variables        254\n",
      "\n",
      "\n",
      "\n",
      " The user has defined    1304   out of    1304   constraint gradients.\n",
      " The user has defined     254   out of     254   objective  gradients.\n",
      "\n",
      "\n",
      " Major Minors     Step   nCon Feasible  Optimal  MeritFunction     nS Penalty\n",
      "     0     32               1 (5.2E-13) 1.3E-05  1.8109226E+03      3           r\n",
      "     1      2  1.0E+00      2  2.8E-05  1.6E-05  1.8109235E+03      2           r\n",
      "     2      2  1.7E-01      4  7.4E-05  1.7E-03  1.8113455E+03      1         sm l\n",
      "     3      1  1.0E+00      6  2.1E-03  2.8E-03  1.8148075E+03                 m\n",
      "     4      0  1.0E+00      7  6.6E-05 (2.4E-07) 1.8152699E+03\n",
      "     5      0  1.0E+00      8 (3.1E-12)(1.2E-15) 1.8152699E+03        3.8E+00\n",
      "\n",
      " SNOPTC EXIT   0 -- finished successfully\n",
      " SNOPTC INFO   1 -- optimality conditions satisfied\n",
      "\n",
      " Problem name                 solver\n",
      " No. of iterations                  37   Objective            1.8152699104E+03\n",
      " No. of major iterations             5   Linear    obj. term  0.0000000000E+00\n",
      " Penalty parameter           3.816E+00   Nonlinear obj. term  1.8152699104E+03\n",
      " User function calls (total)         9\n",
      " No. of degenerate steps            26   Percentage                      70.27\n",
      " Max x                     200 1.5E+01   Max pi                    138 8.7E+03\n",
      " Max Primal infeas         558 4.7E-11   Max Dual infeas           194 1.6E-12\n",
      " Nonlinear constraint violn    4.7E-11\n",
      "\n",
      "\n",
      "\n",
      " Solution printed on file  10\n",
      "      solver  :   t_proc      (avg)   t_wall      (avg)    n_eval\n",
      "   nlp_jac_f  | 483.00us ( 43.91us) 397.80us ( 36.16us)        11\n",
      "   nlp_jac_g  | 398.89ms ( 36.26ms) 398.23ms ( 36.20ms)        11\n",
      "       total  | 404.49ms (404.49ms) 403.49ms (403.49ms)         1\n",
      "Solve successfully\n",
      "\n",
      " Time for MPS input                             0.00 seconds\n",
      " Time for solving problem                       0.33 seconds\n",
      " Time for solution output                       0.00 seconds\n",
      " Time for constraint functions                  0.36 seconds\n",
      " Time for objective function                    0.00 seconds\n",
      "Setting the init for x\n",
      "Settiing the init for u\n",
      " ==============================\n",
      "    SNOPT  C interface  2.2.0   \n",
      " ==============================\n",
      " S N O P T  7.7.7    (Feb 2021)\n",
      " ==============================\n",
      "\n",
      " SNMEMB EXIT 100 -- finished successfully\n",
      " SNMEMB INFO 104 -- memory requirements estimated\n",
      "\n",
      " Trial version of SNOPT -- for evaluation or academic purposes only\n",
      "\n",
      "\n",
      "\n",
      " Nonlinear constraints     304     Linear constraints       0\n",
      " Nonlinear variables       254     Linear variables         0\n",
      " Jacobian  variables       254     Objective variables    254\n",
      " Total constraints         304     Total variables        254\n",
      "\n",
      "\n",
      "\n",
      " The user has defined    1304   out of    1304   constraint gradients.\n",
      " The user has defined     254   out of     254   objective  gradients.\n",
      "\n",
      "\n",
      " Major Minors     Step   nCon Feasible  Optimal  MeritFunction     nS Penalty\n",
      "     0     30               1 (3.1E-12) 5.4E-06  1.8949826E+03      1           r\n",
      "     1      1  1.0E+00      2  1.7E-05  9.5E-06  1.8949828E+03                  r\n",
      "     2      0  1.7E-01      4  2.8E-05  4.7E-04  1.8951652E+03                sm l\n",
      "     3      0  1.0E+00      5  7.1E-04 (1.1E-09) 1.8964282E+03                 m\n",
      "     4      0  1.0E+00      6 (2.2E-16)(8.9E-16) 1.8964282E+03        7.7E-04\n",
      "\n",
      " SNOPTC EXIT   0 -- finished successfully\n",
      " SNOPTC INFO   1 -- optimality conditions satisfied\n",
      "\n",
      " Problem name                 solver\n",
      " No. of iterations                  31   Objective            1.8964282020E+03\n",
      " No. of major iterations             4   Linear    obj. term  0.0000000000E+00\n",
      " Penalty parameter           7.698E-04   Nonlinear obj. term  1.8964282020E+03\n",
      " User function calls (total)         7\n",
      " No. of degenerate steps            27   Percentage                      87.10\n",
      " Max x                     200 1.6E+01   Max pi                    134 9.6E+03\n",
      " Max Primal infeas         522 3.6E-15   Max Dual infeas            30 1.2E-12\n",
      " Nonlinear constraint violn    3.6E-15\n",
      "\n",
      "\n",
      "\n",
      " Solution printed on file  10\n",
      "      solver  :   t_proc      (avg)   t_wall      (avg)    n_eval\n",
      "   nlp_jac_f  | 367.00us ( 40.78us) 322.41us ( 35.82us)         9\n",
      "   nlp_jac_g  | 317.44ms ( 35.27ms) 317.64ms ( 35.29ms)         9\n",
      "       total  | 322.48ms (322.48ms) 322.42ms (322.42ms)         1\n",
      "Solve successfully\n",
      "\n",
      " Time for MPS input                             0.00 seconds\n",
      " Time for solving problem                       0.25 seconds\n",
      " Time for solution output                       0.00 seconds\n",
      " Time for constraint functions                  0.28 seconds\n",
      " Time for objective function                    0.00 seconds\n",
      "Setting the init for x\n",
      "Settiing the init for u\n",
      " ==============================\n",
      "    SNOPT  C interface  2.2.0   \n",
      " ==============================\n",
      " S N O P T  7.7.7    (Feb 2021)\n",
      " ==============================\n",
      "\n",
      " SNMEMB EXIT 100 -- finished successfully\n",
      " SNMEMB INFO 104 -- memory requirements estimated\n",
      "\n",
      " Trial version of SNOPT -- for evaluation or academic purposes only\n",
      "\n",
      "\n",
      "\n",
      " Nonlinear constraints     304     Linear constraints       0\n",
      " Nonlinear variables       254     Linear variables         0\n",
      " Jacobian  variables       254     Objective variables    254\n",
      " Total constraints         304     Total variables        254\n",
      "\n",
      "\n",
      "\n",
      " The user has defined    1304   out of    1304   constraint gradients.\n",
      " The user has defined     254   out of     254   objective  gradients.\n",
      "\n",
      "\n",
      " Major Minors     Step   nCon Feasible  Optimal  MeritFunction     nS Penalty\n",
      "     0     30               1 (2.2E-16) 5.1E-06  1.9814456E+03      1           r\n",
      "     1      1  1.0E+00      2  1.6E-05  8.9E-06  1.9814458E+03                  r\n",
      "     2      0  1.7E-01      4  2.3E-05  3.4E-05  1.9816310E+03                sm l\n",
      "     3      0  1.0E+00      5  5.7E-04 (8.2E-10) 1.9829062E+03                 m\n",
      "     4      0  1.0E+00      6 (1.1E-16)(6.1E-16) 1.9829062E+03        8.3E-04\n",
      "\n",
      " SNOPTC EXIT   0 -- finished successfully\n",
      " SNOPTC INFO   1 -- optimality conditions satisfied\n",
      "\n",
      " Problem name                 solver\n",
      " No. of iterations                  31   Objective            1.9829062272E+03\n",
      " No. of major iterations             4   Linear    obj. term  0.0000000000E+00\n",
      " Penalty parameter           8.341E-04   Nonlinear obj. term  1.9829062272E+03\n",
      " User function calls (total)         7\n",
      " No. of degenerate steps            27   Percentage                      87.10\n",
      " Max x                     200 1.6E+01   Max pi                    130 1.0E+04\n",
      " Max Primal infeas         398 1.8E-15   Max Dual infeas            18 7.5E-13\n",
      " Nonlinear constraint violn    1.8E-15\n",
      "\n",
      "\n",
      "\n",
      " Solution printed on file  10\n",
      "      solver \n",
      " Time for MPS input                             0.00 seconds\n",
      " Time for solving problem                       0.26 seconds\n",
      " Time for solution output                       0.00 seconds\n",
      " Time for constraint functions                  0.29 seconds\n",
      " Time for objective function                    0.00 seconds\n",
      " :   t_proc      (avg)   t_wall      (avg)    n_eval\n",
      "   nlp_jac_f  | 391.00us ( 43.44us) 312.43us ( 34.71us)         9\n",
      "   nlp_jac_g  | 336.09ms ( 37.34ms) 329.15ms ( 36.57ms)         9\n",
      "       total  | 341.23ms (341.23ms) 334.07ms (334.07ms)         1\n",
      "Solve successfully\n",
      "Setting the init for x\n",
      "Settiing the init for u\n",
      " ==============================\n",
      "    SNOPT  C interface  2.2.0   \n",
      " ==============================\n",
      " S N O P T  7.7.7    (Feb 2021)\n",
      " ==============================\n",
      "\n",
      " SNMEMB EXIT 100 -- finished successfully\n",
      " SNMEMB INFO 104 -- memory requirements estimated\n",
      "\n",
      " Trial version of SNOPT -- for evaluation or academic purposes only\n",
      "\n",
      "\n",
      "\n",
      " Nonlinear constraints     304     Linear constraints       0\n",
      " Nonlinear variables       254     Linear variables         0\n",
      " Jacobian  variables       254     Objective variables    254\n",
      " Total constraints         304     Total variables        254\n",
      "\n",
      "\n",
      "\n",
      " The user has defined    1304   out of    1304   constraint gradients.\n",
      " The user has defined     254   out of     254   objective  gradients.\n",
      "\n",
      "\n",
      " Major Minors     Step   nCon Feasible  Optimal  MeritFunction     nS Penalty\n",
      "     0     30               1 (1.1E-16) 3.3E-06  2.0732501E+03      1           r\n",
      "     1      1  1.0E+00      2  8.8E-06  6.8E-06  2.0732502E+03                  r\n",
      "     2      0  1.7E-01      4  1.2E-05  9.7E-06  2.0733987E+03                  rl\n",
      "     3      0  1.0E+00      5  3.0E-04 (3.5E-10) 2.0744779E+03                sm\n",
      "     4      0  1.0E+00      6 (2.2E-16)(7.8E-16) 2.0744778E+03        5.0E+00\n",
      "\n",
      " SNOPTC EXIT   0 -- finished successfully\n",
      " SNOPTC INFO   1 -- optimality conditions satisfied\n",
      "\n",
      " Problem name                 solver\n",
      " No. of iterations                  31   Objective            2.0744778059E+03\n",
      " No. of major iterations             4   Linear    obj. term  0.0000000000E+00\n",
      " Penalty parameter           5.039E+00   Nonlinear obj. term  2.0744778059E+03\n",
      " User function calls (total)         7\n",
      " No. of degenerate steps            28   Percentage                      90.32\n",
      " Max x                     196 1.6E+01   Max pi                    126 1.1E+04\n",
      " Max Primal infeas         546 3.6E-15   Max Dual infeas            34 1.4E-12\n",
      " Nonlinear constraint violn    3.6E-15\n",
      "\n",
      "\n",
      "\n",
      " Solution printed on file  10\n",
      "      solver  :   t_proc      (avg)   t_wall      (avg)    n_eval\n",
      "   nlp_jac_f  | 431.00us ( 47.89us) 318.68us ( 35.41us)         9\n",
      "   nlp_jac_g  | 313.98ms ( 34.89ms) 313.93ms ( 34.88ms)         9\n",
      "       total  | 318.93ms (318.93ms) 318.58ms (318.58ms)         1\n",
      "Solve successfully\n",
      "\n",
      " Time for MPS input                             0.00 seconds\n",
      " Time for solving problem                       0.25 seconds\n",
      " Time for solution output                       0.00 seconds\n",
      " Time for constraint functions                  0.28 seconds\n",
      " Time for objective function                    0.00 seconds\n",
      "Setting the init for x\n",
      "Settiing the init for u\n",
      " ==============================\n",
      "    SNOPT  C interface  2.2.0   \n",
      " ==============================\n",
      " S N O P T  7.7.7    (Feb 2021)\n",
      " ==============================\n",
      "\n",
      " SNMEMB EXIT 100 -- finished successfully\n",
      " SNMEMB INFO 104 -- memory requirements estimated\n",
      "\n",
      " Trial version of SNOPT -- for evaluation or academic purposes only\n",
      "\n",
      "\n",
      "\n",
      " Nonlinear constraints     304     Linear constraints       0\n",
      " Nonlinear variables       254     Linear variables         0\n",
      " Jacobian  variables       254     Objective variables    254\n",
      " Total constraints         304     Total variables        254\n",
      "\n",
      "\n",
      "\n",
      " The user has defined    1304   out of    1304   constraint gradients.\n",
      " The user has defined     254   out of     254   objective  gradients.\n",
      "\n",
      "\n",
      " Major Minors     Step   nCon Feasible  Optimal  MeritFunction     nS Penalty\n",
      "     0     30               1 (2.2E-16)(8.6E-07) 2.1700271E+03                  r\n",
      "\n",
      " SNOPTC EXIT   0 -- finished successfully\n",
      " SNOPTC INFO   1 -- optimality conditions satisfied\n",
      "\n",
      " Problem name                 solver\n",
      " No. of iterations                  30   Objective            2.1700270590E+03\n",
      " No. of major iterations             0   Linear    obj. term  0.0000000000E+00\n",
      " Penalty parameter           0.000E+00   Nonlinear obj. term  2.1700270590E+03\n",
      " User function calls (total)         2\n",
      " No. of degenerate steps            29   Percentage                      96.67\n",
      " Max x                     192 1.6E+01   Max pi                    122 1.2E+04\n",
      " Max Primal infeas         542 3.6E-15   Max Dual infeas           307 1.0E-02\n",
      " Nonlinear constraint violn    3.6E-15\n",
      "\n",
      "\n",
      "\n",
      " Solution printed on file  10\n",
      "      solver  :   t_proc      (avg)   t_wall      (avg)    n_eval\n",
      "   nlp_jac_f  | 179.00us ( 44.75us) 138.85us ( 34.71us)         4\n",
      "   nlp_jac_g  | 143.86ms ( 35.96ms) 143.67ms ( 35.92ms)         4\n",
      "       total  | 147.59ms (147.59ms) 147.29ms (147.29ms)         1\n",
      "Solve successfully\n",
      "\n",
      " Time for MPS input                             0.00 seconds\n",
      " Time for solving problem                       0.07 seconds\n",
      " Time for solution output                       0.00 seconds\n",
      " Time for constraint functions                  0.11 seconds\n",
      " Time for objective function                    0.00 seconds\n",
      "Setting the init for x\n",
      "Settiing the init for u\n",
      " ==============================\n",
      "    SNOPT  C interface  2.2.0   \n",
      " ==============================\n",
      " S N O P T  7.7.7    (Feb 2021)\n",
      " ==============================\n",
      "\n",
      " SNMEMB EXIT 100 -- finished successfully\n",
      " SNMEMB INFO 104 -- memory requirements estimated\n",
      "\n",
      " Trial version of SNOPT -- for evaluation or academic purposes only\n",
      "\n",
      "\n",
      "\n",
      " Nonlinear constraints     304     Linear constraints       0\n",
      " Nonlinear variables       254     Linear variables         0\n",
      " Jacobian  variables       254     Objective variables    254\n",
      " Total constraints         304     Total variables        254\n",
      "\n",
      "\n",
      "\n",
      " The user has defined    1304   out of    1304   constraint gradients.\n",
      " The user has defined     254   out of     254   objective  gradients.\n",
      "\n",
      "\n",
      " Major Minors     Step   nCon Feasible  Optimal  MeritFunction     nS Penalty\n",
      "     0     33               1 (2.2E-16) 8.9E-06  2.2692388E+03      1           r\n",
      "     1      1  1.0E+00      2  1.9E-05  1.3E-05  2.2692396E+03                  r\n",
      "     2      0  1.7E-01      4  1.6E-05  1.7E-05  2.2695534E+03                  rl\n",
      "     3      0  1.0E+00      5  2.6E-04 (1.5E-08) 2.2714632E+03                s\n",
      "     4      0  1.0E+00      6 (2.1E-11)(9.1E-16) 2.2714632E+03        8.2E-01\n",
      "\n",
      " SNOPTC EXIT   0 -- finished successfully\n",
      " SNOPTC INFO   1 -- optimality conditions satisfied\n",
      "\n",
      " Problem name                 solver\n",
      " No. of iterations                  34   Objective            2.2714632070E+03\n",
      " No. of major iterations             4   Linear    obj. term  0.0000000000E+00\n",
      " Penalty parameter           8.243E-01   Nonlinear obj. term  2.2714632070E+03\n",
      " User function calls (total)         7\n",
      " No. of degenerate steps            30   Percentage                      88.24\n",
      " Max x                     188 1.6E+01   Max pi                    118 1.3E+04\n",
      " Max Primal infeas         557 3.5E-10   Max Dual infeas           203 3.5E-12\n",
      " Nonlinear constraint violn    3.5E-10\n",
      "\n",
      "\n",
      "\n",
      " Solution printed on file  10\n",
      "      solver  :   t_proc      (avg)   t_wall      (avg)    n_eval\n",
      "   nlp_jac_f  | 352.00us ( 39.11us) 322.71us ( 35.86us)         9\n",
      "   nlp_jac_g  | 329.37ms ( 36.60ms) 329.00ms ( 36.56ms)         9\n",
      "       total  | 334.39ms (334.39ms) 333.85ms (333.85ms)         1\n",
      "Solve successfully\n",
      "\n",
      " Time for MPS input                             0.00 seconds\n",
      " Time for solving problem                       0.26 seconds\n",
      " Time for solution output                       0.00 seconds\n",
      " Time for constraint functions                  0.29 seconds\n",
      " Time for objective function                    0.00 seconds\n",
      "Setting the init for x\n",
      "Settiing the init for u\n",
      " ==============================\n",
      "    SNOPT  C interface  2.2.0   \n",
      " ==============================\n",
      " S N O P T  7.7.7    (Feb 2021)\n",
      " ==============================\n",
      "\n",
      " SNMEMB EXIT 100 -- finished successfully\n",
      " SNMEMB INFO 104 -- memory requirements estimated\n",
      "\n",
      " Trial version of SNOPT -- for evaluation or academic purposes only\n",
      "\n",
      "\n",
      "\n",
      " Nonlinear constraints     304     Linear constraints       0\n",
      " Nonlinear variables       254     Linear variables         0\n",
      " Jacobian  variables       254     Objective variables    254\n",
      " Total constraints         304     Total variables        254\n",
      "\n",
      "\n",
      "\n",
      " The user has defined    1304   out of    1304   constraint gradients.\n",
      " The user has defined     254   out of     254   objective  gradients.\n",
      "\n",
      "\n",
      " Major Minors     Step   nCon Feasible  Optimal  MeritFunction     nS Penalty\n",
      "     0     34               1 (2.1E-11) 3.4E-06  2.3760160E+03      1           r\n",
      "     1      1  1.0E+00      2  4.6E-06  6.7E-06  2.3760162E+03                  r\n",
      "     2      0  1.7E-01      4  4.8E-06  9.1E-06  2.3761820E+03                  rl\n",
      "     3      0  1.0E+00      5  1.2E-04 (2.1E-07) 2.3773331E+03                sm\n",
      "     4      0  1.0E+00      6 (8.7E-11)(1.2E-15) 2.3773332E+03\n",
      "\n",
      " SNOPTC EXIT   0 -- finished successfully\n",
      " SNOPTC INFO   1 -- optimality conditions satisfied\n",
      "\n",
      " Problem name                 solver\n",
      " No. of iterations                  35   Objective            2.3773331532E+03\n",
      " No. of major iterations             4   Linear    obj. term  0.0000000000E+00\n",
      " Penalty parameter           0.000E+00   Nonlinear obj. term  2.3773331532E+03\n",
      " User function calls (total)         7\n",
      " No. of degenerate steps            29   Percentage                      82.86\n",
      " Max x                     184 1.6E+01   Max pi                    114 1.4E+04\n",
      " Max Primal infeas         558 1.4E-09   Max Dual infeas           204 1.3E-12\n",
      " Nonlinear constraint violn    1.4E-09\n",
      "\n",
      "\n",
      "\n",
      " Solution printed on file  10\n",
      "      solver  :   t_proc      (avg)   t_wall      (avg)    n_eval\n",
      "   nlp_jac_f  | 395.00us ( 43.89us) 318.03us ( 35.34us)         9\n",
      "   nlp_jac_g  | 341.85ms ( 37.98ms) 334.25ms ( 37.14ms)         9\n",
      "       total  | 347.03ms (347.03ms) 339.19ms (339.19ms)         1\n",
      "Solve successfully\n",
      "\n",
      " Time for MPS input                             0.00 seconds\n",
      " Time for solving problem                       0.26 seconds\n",
      " Time for solution output                       0.00 seconds\n",
      " Time for constraint functions                  0.30 seconds\n",
      " Time for objective function                    0.00 seconds\n",
      "Setting the init for x\n",
      "Settiing the init for u\n",
      " ==============================\n",
      "    SNOPT  C interface  2.2.0   \n",
      " ==============================\n",
      " S N O P T  7.7.7    (Feb 2021)\n",
      " ==============================\n",
      "\n",
      " SNMEMB EXIT 100 -- finished successfully\n",
      " SNMEMB INFO 104 -- memory requirements estimated\n",
      "\n",
      " Trial version of SNOPT -- for evaluation or academic purposes only\n",
      "\n",
      "\n",
      "\n",
      " Nonlinear constraints     304     Linear constraints       0\n",
      " Nonlinear variables       254     Linear variables         0\n",
      " Jacobian  variables       254     Objective variables    254\n",
      " Total constraints         304     Total variables        254\n",
      "\n",
      "\n",
      "\n",
      " The user has defined    1304   out of    1304   constraint gradients.\n",
      " The user has defined     254   out of     254   objective  gradients.\n",
      "\n",
      "\n",
      " Major Minors     Step   nCon Feasible  Optimal  MeritFunction     nS Penalty\n",
      "     0     32               1 (8.7E-11)(4.3E-12) 2.4870079E+03                  r\n",
      "\n",
      " SNOPTC EXIT   0 -- finished successfully\n",
      " SNOPTC INFO   1 -- optimality conditions satisfied\n",
      "\n",
      " Problem name                 solver\n",
      " No. of iterations                  32   Objective            2.4870078646E+03\n",
      " No. of major iterations             0   Linear    obj. term  0.0000000000E+00\n",
      " Penalty parameter           0.000E+00   Nonlinear obj. term  2.4870078646E+03\n",
      " User function calls (total)         2\n",
      " No. of degenerate steps            29   Percentage                      90.62\n",
      " Max x                     180 1.6E+01   Max pi                    110 1.4E+04\n",
      " Max Primal infeas         554 1.4E-09   Max Dual infeas           204 6.2E-08\n",
      " Nonlinear constraint violn    1.4E-09\n",
      "\n",
      "\n",
      "\n",
      " Solution printed on file  10\n",
      "      solver  :   t_proc      (avg)   t_wall      (avg)    n_eval\n",
      "   nlp_jac_f  | 161.00us ( 40.25us) 134.76us ( 33.69us)         4\n",
      "   nlp_jac_g  | 146.95ms ( 36.74ms) 146.73ms ( 36.68ms)         4\n",
      "       total  | 150.77ms (150.77ms) 150.44ms (150.44ms)         1\n",
      "Solve successfully\n",
      "\n",
      " Time for MPS input                             0.00 seconds\n",
      " Time for solving problem                       0.07 seconds\n",
      " Time for solution output                       0.00 seconds\n",
      " Time for constraint functions                  0.11 seconds\n",
      " Time for objective function                    0.00 seconds\n",
      "Setting the init for x\n",
      "Settiing the init for u\n",
      " ==============================\n",
      "    SNOPT  C interface  2.2.0   \n",
      " ==============================\n",
      " S N O P T  7.7.7    (Feb 2021)\n",
      " ==============================\n",
      "\n",
      " SNMEMB EXIT 100 -- finished successfully\n",
      " SNMEMB INFO 104 -- memory requirements estimated\n",
      "\n",
      " Trial version of SNOPT -- for evaluation or academic purposes only\n",
      "\n",
      "\n",
      "\n",
      " Nonlinear constraints     304     Linear constraints       0\n",
      " Nonlinear variables       254     Linear variables         0\n",
      " Jacobian  variables       254     Objective variables    254\n",
      " Total constraints         304     Total variables        254\n",
      "\n",
      "\n",
      "\n",
      " The user has defined    1304   out of    1304   constraint gradients.\n",
      " The user has defined     254   out of     254   objective  gradients.\n",
      "\n",
      "\n",
      " Major Minors     Step   nCon Feasible  Optimal  MeritFunction     nS Penalty\n",
      "     0     33               1 (8.7E-11)(5.7E-07) 2.6011092E+03                  r\n",
      "\n",
      " SNOPTC EXIT   0 -- finished successfully\n",
      " SNOPTC INFO   1 -- optimality conditions satisfied\n",
      "\n",
      " Problem name                 solver\n",
      " No. of iterations                  33   Objective            2.6011092110E+03\n",
      " No. of major iterations             0   Linear    obj. term  0.0000000000E+00\n",
      " Penalty parameter           0.000E+00   Nonlinear obj. term  2.6011092110E+03\n",
      " User function calls (total)         2\n",
      " No. of degenerate steps            30   Percentage                      90.91\n",
      " Max x                     176 1.6E+01   Max pi                    106 1.5E+04\n",
      " Max Primal infeas         550 1.4E-09   Max Dual infeas           305 8.6E-03\n",
      " Nonlinear constraint violn    1.4E-09\n",
      "\n",
      "\n",
      "\n",
      " Solution printed on file  10\n",
      "      solver \n",
      " Time for MPS input                             0.00 seconds\n",
      " Time for solving problem                       0.07 seconds\n",
      " :   t_proc      (avg)   t_wall      (avg)    n_eval\n",
      "   nlp_jac_f  | 171.00us ( 42.75us) 131.34us ( 32.83us)         4\n",
      "   nlp_jac_g  | 145.43ms ( 36.36ms) 145.21ms ( 36.30ms)         4\n",
      "       total  | 149.41ms (149.41ms) 149.04ms (149.04ms)         1\n",
      "Solve successfully\n",
      " Time for solution output                       0.00 seconds\n",
      " Time for constraint functions                  0.11 seconds\n",
      " Time for objective function                    0.00 seconds\n",
      "Setting the init for x\n",
      "Settiing the init for u\n",
      " ==============================\n",
      "    SNOPT  C interface  2.2.0   \n",
      " ==============================\n",
      " S N O P T  7.7.7    (Feb 2021)\n",
      " ==============================\n",
      "\n",
      " SNMEMB EXIT 100 -- finished successfully\n",
      " SNMEMB INFO 104 -- memory requirements estimated\n",
      "\n",
      " Trial version of SNOPT -- for evaluation or academic purposes only\n",
      "\n",
      "\n",
      "\n",
      " Nonlinear constraints     304     Linear constraints       0\n",
      " Nonlinear variables       254     Linear variables         0\n",
      " Jacobian  variables       254     Objective variables    254\n",
      " Total constraints         304     Total variables        254\n",
      "\n",
      "\n",
      "\n",
      " The user has defined    1304   out of    1304   constraint gradients.\n",
      " The user has defined     254   out of     254   objective  gradients.\n",
      "\n",
      "\n",
      " Major Minors     Step   nCon Feasible  Optimal  MeritFunction     nS Penalty\n",
      "     0     36               1 (8.7E-11) 3.5E-06  2.7199006E+03      1           r\n",
      "     1      1  1.0E+00      2  5.0E-06  6.4E-06  2.7199008E+03                  r\n",
      "     2      0  1.7E-01      4  4.2E-06  8.5E-06  2.7200863E+03                  rl\n",
      "     3      0  1.0E+00      5  1.8E-05 (5.7E-08) 2.7213387E+03                s\n",
      "     4      0  1.0E+00      6 (5.7E-11)(2.6E-14) 2.7213387E+03\n",
      "\n",
      " SNOPTC EXIT   0 -- finished successfully\n",
      " SNOPTC INFO   1 -- optimality conditions satisfied\n",
      "\n",
      " Problem name                 solver\n",
      " No. of iterations                  37   Objective            2.7213386559E+03\n",
      " No. of major iterations             4   Linear    obj. term  0.0000000000E+00\n",
      " Penalty parameter           0.000E+00   Nonlinear obj. term  2.7213386559E+03\n",
      " User function calls (total)         7\n",
      " No. of degenerate steps            31   Percentage                      83.78\n",
      " Max x                     172 1.6E+01   Max pi                      2 1.6E+04\n",
      " Max Primal infeas         558 9.2E-10   Max Dual infeas           182 4.1E-10\n",
      " Nonlinear constraint violn    9.2E-10\n",
      "\n",
      "\n",
      "\n",
      " Solution printed on file  10\n",
      "      solver  :   t_proc      (avg)   t_wall      (avg)    n_eval\n",
      "   nlp_jac_f  | 324.00us ( 36.00us) 315.67us ( 35.07us)         9\n",
      "   nlp_jac_g  | 325.39ms ( 36.16ms) 324.71ms ( 36.08ms)         9\n",
      "       total  | 330.46ms (330.46ms) 329.64ms (329.64ms)         1\n",
      "Solve successfully\n",
      "\n",
      " Time for MPS input                             0.00 seconds\n",
      " Time for solving problem                       0.26 seconds\n",
      " Time for solution output                       0.00 seconds\n",
      " Time for constraint functions                  0.29 seconds\n",
      " Time for objective function                    0.00 seconds\n",
      "Setting the init for x\n",
      "Settiing the init for u\n",
      " ==============================\n",
      "    SNOPT  C interface  2.2.0   \n",
      " ==============================\n",
      " S N O P T  7.7.7    (Feb 2021)\n",
      " ==============================\n",
      "\n",
      " SNMEMB EXIT 100 -- finished successfully\n",
      " SNMEMB INFO 104 -- memory requirements estimated\n",
      "\n",
      " Trial version of SNOPT -- for evaluation or academic purposes only\n",
      "\n",
      "\n",
      "\n",
      " Nonlinear constraints     304     Linear constraints       0\n",
      " Nonlinear variables       254     Linear variables         0\n",
      " Jacobian  variables       254     Objective variables    254\n",
      " Total constraints         304     Total variables        254\n",
      "\n",
      "\n",
      "\n",
      " The user has defined    1304   out of    1304   constraint gradients.\n",
      " The user has defined     254   out of     254   objective  gradients.\n",
      "\n",
      "\n",
      " Major Minors     Step   nCon Feasible  Optimal  MeritFunction     nS Penalty\n",
      "     0     34               1 (5.7E-11)(5.6E-12) 2.8460198E+03                  r\n",
      "\n",
      " SNOPTC EXIT   0 -- finished successfully\n",
      " SNOPTC INFO   1 -- optimality conditions satisfied\n",
      "\n",
      " Problem name                 solver\n",
      " No. of iterations                  34   Objective            2.8460198198E+03\n",
      " No. of major iterations             0   Linear    obj. term  0.0000000000E+00\n",
      " Penalty parameter           0.000E+00   Nonlinear obj. term  2.8460198198E+03\n",
      " User function calls (total)         2\n",
      " No. of degenerate steps            32   Percentage                      94.12\n",
      " Max x                     168 1.6E+01   Max pi                      2 1.5E+04\n",
      " Max Primal infeas         554 9.2E-10   Max Dual infeas           204 8.3E-08\n",
      " Nonlinear constraint violn    9.2E-10\n",
      "\n",
      "\n",
      "\n",
      " Solution printed on file  10\n",
      "      solver  :   t_proc      (avg)   t_wall      (avg)    n_eval\n",
      "   nlp_jac_f  | 135.00us ( 33.75us) 131.42us ( 32.86us)         4\n",
      "   nlp_jac_g  | 144.88ms ( 36.22ms) 144.63ms ( 36.16ms)         4\n",
      "       total  | 148.74ms (148.74ms) 148.44ms (148.44ms)         1\n",
      "Solve successfully\n",
      "\n",
      " Time for MPS input                             0.00 seconds\n",
      " Time for solving problem                       0.07 seconds\n",
      " Time for solution output                       0.00 seconds\n",
      " Time for constraint functions                  0.11 seconds\n",
      " Time for objective function                    0.00 seconds\n",
      "Setting the init for x\n",
      "Settiing the init for u\n",
      " ==============================\n",
      "    SNOPT  C interface  2.2.0   \n",
      " ==============================\n",
      " S N O P T  7.7.7    (Feb 2021)\n",
      " ==============================\n",
      "\n",
      " SNMEMB EXIT 100 -- finished successfully\n",
      " SNMEMB INFO 104 -- memory requirements estimated\n",
      "\n",
      " Trial version of SNOPT -- for evaluation or academic purposes only\n",
      "\n",
      "\n",
      "\n",
      " Nonlinear constraints     304     Linear constraints       0\n",
      " Nonlinear variables       254     Linear variables         0\n",
      " Jacobian  variables       254     Objective variables    254\n",
      " Total constraints         304     Total variables        254\n",
      "\n",
      "\n",
      "\n",
      " The user has defined    1304   out of    1304   constraint gradients.\n",
      " The user has defined     254   out of     254   objective  gradients.\n",
      "\n",
      "\n",
      " Major Minors     Step   nCon Feasible  Optimal  MeritFunction     nS Penalty\n",
      "     0     35               1 (5.7E-11)(6.2E-12) 2.9766381E+03                  r\n",
      "\n",
      " SNOPTC EXIT   0 -- finished successfully\n",
      " SNOPTC INFO   1 -- optimality conditions satisfied\n",
      "\n",
      " Problem name                 solver\n",
      " No. of iterations                  35   Objective            2.9766380676E+03\n",
      " No. of major iterations             0   Linear    obj. term  0.0000000000E+00\n",
      " Penalty parameter           0.000E+00   Nonlinear obj. term  2.9766380676E+03\n",
      " User function calls (total)         2\n",
      " No. of degenerate steps            33   Percentage                      94.29\n",
      " Max x                     164 1.6E+01   Max pi                      2 1.4E+04\n",
      " Max Primal infeas         550 9.2E-10   Max Dual infeas           200 8.5E-08\n",
      " Nonlinear constraint violn    9.2E-10\n",
      "\n",
      "\n",
      "\n",
      " Solution printed on file  10\n",
      "      solver \n",
      " :   t_proc      (avg)   t_wall      (avg)    n_eval\n",
      "   nlp_jac_f  | 143.00us ( 35.75us) 134.87us ( 33.72us)         4\n",
      "   nlp_jac_g  | 144.63ms ( 36.16ms) 144.41ms ( 36.10ms)         4\n",
      "       total  | 148.50ms (148.50ms) 148.21ms (148.21ms)         1\n",
      "Solve successfully\n",
      " Time for MPS input                             0.00 seconds\n",
      " Time for solving problem                       0.07 seconds\n",
      " Time for solution output                       0.00 seconds\n",
      " Time for constraint functions                  0.11 seconds\n",
      " Time for objective function                    0.00 seconds\n",
      "Setting the init for x\n",
      "Settiing the init for u\n",
      " ==============================\n",
      "    SNOPT  C interface  2.2.0   \n",
      " ==============================\n",
      " S N O P T  7.7.7    (Feb 2021)\n",
      " ==============================\n",
      "\n",
      " SNMEMB EXIT 100 -- finished successfully\n",
      " SNMEMB INFO 104 -- memory requirements estimated\n",
      "\n",
      " Trial version of SNOPT -- for evaluation or academic purposes only\n",
      "\n",
      "\n",
      "\n",
      " Nonlinear constraints     304     Linear constraints       0\n",
      " Nonlinear variables       254     Linear variables         0\n",
      " Jacobian  variables       254     Objective variables    254\n",
      " Total constraints         304     Total variables        254\n",
      "\n",
      "\n",
      "\n",
      " The user has defined    1304   out of    1304   constraint gradients.\n",
      " The user has defined     254   out of     254   objective  gradients.\n",
      "\n",
      "\n",
      " Major Minors     Step   nCon Feasible  Optimal  MeritFunction     nS Penalty\n",
      "     0     35               1 (5.7E-11)(6.8E-12) 3.1137493E+03                  r\n",
      "\n",
      " SNOPTC EXIT   0 -- finished successfully\n",
      " SNOPTC INFO   1 -- optimality conditions satisfied\n",
      "\n",
      " Problem name                 solver\n",
      " No. of iterations                  35   Objective            3.1137493326E+03\n",
      " No. of major iterations             0   Linear    obj. term  0.0000000000E+00\n",
      " Penalty parameter           0.000E+00   Nonlinear obj. term  3.1137493326E+03\n",
      " User function calls (total)         2\n",
      " No. of degenerate steps            33   Percentage                      94.29\n",
      " Max x                     160 1.6E+01   Max pi                      2 1.3E+04\n",
      " Max Primal infeas         546 9.2E-10   Max Dual infeas           196 8.6E-08\n",
      " Nonlinear constraint violn    9.2E-10\n",
      "\n",
      "\n",
      "\n",
      " Solution printed on file  10\n",
      "      solver  :   t_proc      (avg)   t_wall      (avg)    n_eval\n",
      "   nlp_jac_f  | 137.00us ( 34.25us) 131.78us ( 32.95us)         4\n",
      "   nlp_jac_g  | 141.79ms ( 35.45ms) 141.92ms ( 35.48ms)         4\n",
      "       total  | 145.58ms (145.58ms) 145.62ms (145.62ms)         1\n",
      "Solve successfully\n",
      "\n",
      " Time for MPS input                             0.00 seconds\n",
      " Time for solving problem                       0.07 seconds\n",
      " Time for solution output                       0.00 seconds\n",
      " Time for constraint functions                  0.11 seconds\n",
      " Time for objective function                    0.00 seconds\n",
      "Setting the init for x\n",
      "Settiing the init for u\n",
      " ==============================\n",
      "    SNOPT  C interface  2.2.0   \n",
      " ==============================\n",
      " S N O P T  7.7.7    (Feb 2021)\n",
      " ==============================\n",
      "\n",
      " SNMEMB EXIT 100 -- finished successfully\n",
      " SNMEMB INFO 104 -- memory requirements estimated\n",
      "\n",
      " Trial version of SNOPT -- for evaluation or academic purposes only\n",
      "\n",
      "\n",
      "\n",
      " Nonlinear constraints     304     Linear constraints       0\n",
      " Nonlinear variables       254     Linear variables         0\n",
      " Jacobian  variables       254     Objective variables    254\n",
      " Total constraints         304     Total variables        254\n",
      "\n",
      "\n",
      "\n",
      " The user has defined    1304   out of    1304   constraint gradients.\n",
      " The user has defined     254   out of     254   objective  gradients.\n",
      "\n",
      "\n",
      " Major Minors     Step   nCon Feasible  Optimal  MeritFunction     nS Penalty\n",
      "     0     35               1 (5.7E-11)(7.5E-12) 3.2578198E+03                  r\n",
      "\n",
      " SNOPTC EXIT   0 -- finished successfully\n",
      " SNOPTC INFO   1 -- optimality conditions satisfied\n",
      "\n",
      " Problem name                 solver\n",
      " No. of iterations                  35   Objective            3.2578198203E+03\n",
      " No. of major iterations             0   Linear    obj. term  0.0000000000E+00\n",
      " Penalty parameter           0.000E+00   Nonlinear obj. term  3.2578198203E+03\n",
      " User function calls (total)         2\n",
      " No. of degenerate steps            34   Percentage                      97.14\n",
      " Max x                     156 1.6E+01   Max pi                      2 1.2E+04\n",
      " Max Primal infeas         542 9.2E-10   Max Dual infeas           192 8.8E-08\n",
      " Nonlinear constraint violn    9.2E-10\n",
      "\n",
      "\n",
      "\n",
      " Solution printed on file  10\n",
      "      solver  :   t_proc      (avg)   t_wall      (avg)    n_eval\n",
      "   nlp_jac_f  | 174.00us ( 43.50us) 170.29us ( 42.57us)         4\n",
      "   nlp_jac_g  | 140.10ms ( 35.03ms) 140.02ms ( 35.00ms)         4\n",
      "       total  | 143.91ms (143.91ms) 143.72ms (143.72ms)         1\n",
      "Solve successfully\n",
      "\n",
      " Time for MPS input                             0.00 seconds\n",
      " Time for solving problem                       0.07 seconds\n",
      " Time for solution output                       0.00 seconds\n",
      " Time for constraint functions                  0.10 seconds\n",
      " Time for objective function                    0.00 seconds\n",
      "Setting the init for x\n",
      "Settiing the init for u\n",
      " ==============================\n",
      "    SNOPT  C interface  2.2.0   \n",
      " ==============================\n",
      " S N O P T  7.7.7    (Feb 2021)\n",
      " ==============================\n",
      "\n",
      " SNMEMB EXIT 100 -- finished successfully\n",
      " SNMEMB INFO 104 -- memory requirements estimated\n",
      "\n",
      " Trial version of SNOPT -- for evaluation or academic purposes only\n",
      "\n",
      "\n",
      "\n",
      " Nonlinear constraints     304     Linear constraints       0\n",
      " Nonlinear variables       254     Linear variables         0\n",
      " Jacobian  variables       254     Objective variables    254\n",
      " Total constraints         304     Total variables        254\n",
      "\n",
      "\n",
      "\n",
      " The user has defined    1304   out of    1304   constraint gradients.\n",
      " The user has defined     254   out of     254   objective  gradients.\n",
      "\n",
      "\n",
      " Major Minors     Step   nCon Feasible  Optimal  MeritFunction     nS Penalty\n",
      "     0     35               1 (5.7E-11)(8.2E-12) 3.4091516E+03                  r\n",
      "\n",
      " SNOPTC EXIT   0 -- finished successfully\n",
      " SNOPTC INFO   1 -- optimality conditions satisfied\n",
      "\n",
      " Problem name                 solver\n",
      " No. of iterations                  35   Objective            3.4091516236E+03\n",
      " No. of major iterations             0   Linear    obj. term  0.0000000000E+00\n",
      " Penalty parameter           0.000E+00   Nonlinear obj. term  3.4091516236E+03\n",
      " User function calls (total)         2\n",
      " No. of degenerate steps            30   Percentage                      85.71\n",
      " Max x                     152 1.6E+01   Max pi                      2 1.1E+04\n",
      " Max Primal infeas         538 9.2E-10   Max Dual infeas           188 9.0E-08\n",
      " Nonlinear constraint violn    9.2E-10\n",
      "\n",
      "\n",
      "\n",
      " Solution printed on file  10\n",
      "      solver  :   t_proc      (avg)   t_wall      (avg)    n_eval\n",
      "   nlp_jac_f  | 188.00us ( 47.00us) 139.00us ( 34.75us)         4\n",
      "   nlp_jac_g  | 146.03ms ( 36.51ms) 145.88ms ( 36.47ms)         4\n",
      "       total  | 150.26ms (150.26ms) 149.93ms (149.93ms)         1\n",
      "Solve successfully\n",
      "\n",
      " Time for MPS input                             0.00 seconds\n",
      " Time for solving problem                       0.08 seconds\n",
      " Time for solution output                       0.00 seconds\n",
      " Time for constraint functions                  0.11 seconds\n",
      " Time for objective function                    0.00 seconds\n",
      "Setting the init for x\n",
      "Settiing the init for u\n",
      " ==============================\n",
      "    SNOPT  C interface  2.2.0   \n",
      " ==============================\n",
      " S N O P T  7.7.7    (Feb 2021)\n",
      " ==============================\n",
      "\n",
      " SNMEMB EXIT 100 -- finished successfully\n",
      " SNMEMB INFO 104 -- memory requirements estimated\n",
      "\n",
      " Trial version of SNOPT -- for evaluation or academic purposes only\n",
      "\n",
      "\n",
      "\n",
      " Nonlinear constraints     304     Linear constraints       0\n",
      " Nonlinear variables       254     Linear variables         0\n",
      " Jacobian  variables       254     Objective variables    254\n",
      " Total constraints         304     Total variables        254\n",
      "\n",
      "\n",
      "\n",
      " The user has defined    1304   out of    1304   constraint gradients.\n",
      " The user has defined     254   out of     254   objective  gradients.\n",
      "\n",
      "\n",
      " Major Minors     Step   nCon Feasible  Optimal  MeritFunction     nS Penalty\n",
      "     0     35               1 (5.7E-11)(9.0E-12) 3.5679215E+03                  r\n",
      "\n",
      " SNOPTC EXIT   0 -- finished successfully\n",
      " SNOPTC INFO   1 -- optimality conditions satisfied\n",
      "\n",
      " Problem name                 solver\n",
      " No. of iterations                  35   Objective            3.5679215180E+03\n",
      " No. of major iterations             0   Linear    obj. term  0.0000000000E+00\n",
      " Penalty parameter           0.000E+00   Nonlinear obj. term  3.5679215180E+03\n",
      " User function calls (total)         2\n",
      " No. of degenerate steps            30   Percentage                      85.71\n",
      " Max x                     148 1.6E+01   Max pi                      2 1.0E+04\n",
      " Max Primal infeas         534 9.2E-10   Max Dual infeas           184 9.2E-08\n",
      " Nonlinear constraint violn    9.2E-10\n",
      "\n",
      "\n",
      "\n",
      " Solution printed on file  10\n",
      "      solver \n",
      " Time for MPS input                             0.00 seconds\n",
      " Time for solving problem                       0.07 seconds\n",
      " :   t_proc      (avg)   t_wall      (avg)    n_eval\n",
      "   nlp_jac_f  | 175.00us ( 43.75us) 135.06us ( 33.77us)         4\n",
      "   nlp_jac_g  | 145.97ms ( 36.49ms) 145.84ms ( 36.46ms)         4\n",
      "       total  | 149.85ms (149.85ms) 149.59ms (149.59ms)         1\n",
      "Solve successfully\n",
      " Time for solution output                       0.00 seconds\n",
      " Time for constraint functions                  0.11 seconds\n",
      " Time for objective function                    0.00 seconds\n",
      "Setting the init for x\n",
      "Settiing the init for u\n",
      " ==============================\n",
      "    SNOPT  C interface  2.2.0   \n",
      " ==============================\n",
      " S N O P T  7.7.7    (Feb 2021)\n",
      " ==============================\n",
      "\n",
      " SNMEMB EXIT 100 -- finished successfully\n",
      " SNMEMB INFO 104 -- memory requirements estimated\n",
      "\n",
      " Trial version of SNOPT -- for evaluation or academic purposes only\n",
      "\n",
      "\n",
      "\n",
      " Nonlinear constraints     304     Linear constraints       0\n",
      " Nonlinear variables       254     Linear variables         0\n",
      " Jacobian  variables       254     Objective variables    254\n",
      " Total constraints         304     Total variables        254\n",
      "\n",
      "\n",
      "\n",
      " The user has defined    1304   out of    1304   constraint gradients.\n",
      " The user has defined     254   out of     254   objective  gradients.\n",
      "\n",
      "\n",
      " Major Minors     Step   nCon Feasible  Optimal  MeritFunction     nS Penalty\n",
      "     0     36               1 (5.7E-11)(1.0E-11) 3.7342732E+03                  r\n",
      "\n",
      " SNOPTC EXIT   0 -- finished successfully\n",
      " SNOPTC INFO   1 -- optimality conditions satisfied\n",
      "\n",
      " Problem name                 solver\n",
      " No. of iterations                  36   Objective            3.7342731559E+03\n",
      " No. of major iterations             0   Linear    obj. term  0.0000000000E+00\n",
      " Penalty parameter           0.000E+00   Nonlinear obj. term  3.7342731559E+03\n",
      " User function calls (total)         2\n",
      " No. of degenerate steps            31   Percentage                      86.11\n",
      " Max x                     144 1.6E+01   Max pi                      2 9.4E+03\n",
      " Max Primal infeas         530 9.2E-10   Max Dual infeas           180 9.4E-08\n",
      " Nonlinear constraint violn    9.2E-10\n",
      "\n",
      "\n",
      "\n",
      " Solution printed on file  10\n",
      "      solver  :   t_proc      (avg)   t_wall      (avg)    n_eval\n",
      "   nlp_jac_f  | 138.00us ( 34.50us) 134.73us ( 33.68us)         4\n",
      "   nlp_jac_g  | 164.77ms ( 41.19ms) 150.23ms ( 37.56ms)         4\n",
      "       total  | 168.67ms (168.67ms) 154.00ms (154.00ms)         1\n",
      "Solve successfully\n",
      "\n",
      " Time for MPS input                             0.00 seconds\n",
      " Time for solving problem                       0.08 seconds\n",
      " Time for solution output                       0.00 seconds\n",
      " Time for constraint functions                  0.11 seconds\n",
      " Time for objective function                    0.00 seconds\n",
      "Setting the init for x\n",
      "Settiing the init for u\n",
      " ==============================\n",
      "    SNOPT  C interface  2.2.0   \n",
      " ==============================\n",
      " S N O P T  7.7.7    (Feb 2021)\n",
      " ==============================\n",
      "\n",
      " SNMEMB EXIT 100 -- finished successfully\n",
      " SNMEMB INFO 104 -- memory requirements estimated\n",
      "\n",
      " Trial version of SNOPT -- for evaluation or academic purposes only\n",
      "\n",
      "\n",
      "\n",
      " Nonlinear constraints     304     Linear constraints       0\n",
      " Nonlinear variables       254     Linear variables         0\n",
      " Jacobian  variables       254     Objective variables    254\n",
      " Total constraints         304     Total variables        254\n",
      "\n",
      "\n",
      "\n",
      " The user has defined    1304   out of    1304   constraint gradients.\n",
      " The user has defined     254   out of     254   objective  gradients.\n",
      "\n",
      "\n",
      " Major Minors     Step   nCon Feasible  Optimal  MeritFunction     nS Penalty\n",
      "     0     36               1 (5.7E-11)(1.1E-11) 3.9083723E+03                  r\n",
      "\n",
      " SNOPTC EXIT   0 -- finished successfully\n",
      " SNOPTC INFO   1 -- optimality conditions satisfied\n",
      "\n",
      " Problem name                 solver\n",
      " No. of iterations                  36   Objective            3.9083723446E+03\n",
      " No. of major iterations             0   Linear    obj. term  0.0000000000E+00\n",
      " Penalty parameter           0.000E+00   Nonlinear obj. term  3.9083723446E+03\n",
      " User function calls (total)         2\n",
      " No. of degenerate steps            30   Percentage                      83.33\n",
      " Max x                     140 1.6E+01   Max pi                      2 8.7E+03\n",
      " Max Primal infeas         526 9.2E-10   Max Dual infeas           176 9.6E-08\n",
      " Nonlinear constraint violn    9.2E-10\n",
      "\n",
      "\n",
      "\n",
      " Solution printed on file  10\n",
      "      solver  :   t_proc      (avg)   t_wall      (avg)    n_eval\n",
      "   nlp_jac_f  | 152.00us ( 38.00us) 147.69us ( 36.92us)         4\n",
      "   nlp_jac_g  | 148.55ms ( 37.14ms) 148.31ms ( 37.08ms)         4\n",
      "       total  | 152.57ms (152.57ms) 152.18ms (152.18ms)         1\n",
      "Solve successfully\n",
      "\n",
      " Time for MPS input                             0.00 seconds\n",
      " Time for solving problem                       0.07 seconds\n",
      " Time for solution output                       0.00 seconds\n",
      " Time for constraint functions                  0.11 seconds\n",
      " Time for objective function                    0.00 seconds\n",
      "Setting the init for x\n",
      "Settiing the init for u\n",
      " ==============================\n",
      "    SNOPT  C interface  2.2.0   \n",
      " ==============================\n",
      " S N O P T  7.7.7    (Feb 2021)\n",
      " ==============================\n",
      "\n",
      " SNMEMB EXIT 100 -- finished successfully\n",
      " SNMEMB INFO 104 -- memory requirements estimated\n",
      "\n",
      " Trial version of SNOPT -- for evaluation or academic purposes only\n",
      "\n",
      "\n",
      "\n",
      " Nonlinear constraints     304     Linear constraints       0\n",
      " Nonlinear variables       254     Linear variables         0\n",
      " Jacobian  variables       254     Objective variables    254\n",
      " Total constraints         304     Total variables        254\n",
      "\n",
      "\n",
      "\n",
      " The user has defined    1304   out of    1304   constraint gradients.\n",
      " The user has defined     254   out of     254   objective  gradients.\n",
      "\n",
      "\n",
      " Major Minors     Step   nCon Feasible  Optimal  MeritFunction     nS Penalty\n",
      "     0     36               1 (5.7E-11)(1.2E-11) 4.0904132E+03                  r\n",
      "\n",
      " SNOPTC EXIT   0 -- finished successfully\n",
      " SNOPTC INFO   1 -- optimality conditions satisfied\n",
      "\n",
      " Problem name                 solver\n",
      " No. of iterations                  36   Objective            4.0904132163E+03\n",
      " No. of major iterations             0   Linear    obj. term  0.0000000000E+00\n",
      " Penalty parameter           0.000E+00   Nonlinear obj. term  4.0904132163E+03\n",
      " User function calls (total)         2\n",
      " No. of degenerate steps            30   Percentage                      83.33\n",
      " Max x                     136 1.6E+01   Max pi                      2 8.0E+03\n",
      " Max Primal infeas         522 9.2E-10   Max Dual infeas           172 9.8E-08\n",
      " Nonlinear constraint violn    9.2E-10\n",
      "\n",
      "\n",
      "\n",
      " Solution printed on file  10\n",
      "      solver  :   t_proc      (avg)   t_wall      (avg)    n_eval\n",
      "   nlp_jac_f  | 149.00us ( 37.25us) 142.57us ( 35.64us)         4\n",
      "   nlp_jac_g  | 147.87ms ( 36.97ms) 147.57ms ( 36.89ms)         4\n",
      "       total  | 151.65ms (151.65ms) 151.28ms (151.28ms)         1\n",
      "Solve successfully\n",
      "\n",
      " Time for MPS input                             0.00 seconds\n",
      " Time for solving problem                       0.07 seconds\n",
      " Time for solution output                       0.00 seconds\n",
      " Time for constraint functions                  0.11 seconds\n",
      " Time for objective function                    0.00 seconds\n",
      "Setting the init for x\n",
      "Settiing the init for u\n",
      " ==============================\n",
      "    SNOPT  C interface  2.2.0   \n",
      " ==============================\n",
      " S N O P T  7.7.7    (Feb 2021)\n",
      " ==============================\n",
      "\n",
      " SNMEMB EXIT 100 -- finished successfully\n",
      " SNMEMB INFO 104 -- memory requirements estimated\n",
      "\n",
      " Trial version of SNOPT -- for evaluation or academic purposes only\n",
      "\n",
      "\n",
      "\n",
      " Nonlinear constraints     304     Linear constraints       0\n",
      " Nonlinear variables       254     Linear variables         0\n",
      " Jacobian  variables       254     Objective variables    254\n",
      " Total constraints         304     Total variables        254\n",
      "\n",
      "\n",
      "\n",
      " The user has defined    1304   out of    1304   constraint gradients.\n",
      " The user has defined     254   out of     254   objective  gradients.\n",
      "\n",
      "\n",
      " Major Minors     Step   nCon Feasible  Optimal  MeritFunction     nS Penalty\n",
      "     0     35               1 (5.7E-11)(1.4E-11) 4.2805876E+03                  r\n",
      "\n",
      " SNOPTC EXIT   0 -- finished successfully\n",
      " SNOPTC INFO   1 -- optimality conditions satisfied\n",
      "\n",
      " Problem name                 solver\n",
      " No. of iterations                  35   Objective            4.2805875503E+03\n",
      " No. of major iterations             0   Linear    obj. term  0.0000000000E+00\n",
      " Penalty parameter           0.000E+00   Nonlinear obj. term  4.2805875503E+03\n",
      " User function calls (total)         2\n",
      " No. of degenerate steps            29   Percentage                      82.86\n",
      " Max x                     132 1.6E+01   Max pi                      2 7.3E+03\n",
      " Max Primal infeas         518 9.2E-10   Max Dual infeas           168 1.0E-07\n",
      " Nonlinear constraint violn    9.2E-10\n",
      "\n",
      "\n",
      "\n",
      " Solution printed on file  10\n",
      "      solver  :   t_proc      (avg)   t_wall      (avg)    n_eval\n",
      "   nlp_jac_f  | 174.00us ( 43.50us) 132.04us ( 33.01us)         4\n",
      "   nlp_jac_g  | 146.40ms ( 36.60ms) 146.15ms ( 36.54ms)         4\n",
      "       total  | 150.21ms (150.21ms) 149.87ms (149.87ms)         1\n",
      "Solve successfully\n",
      "\n",
      " Time for MPS input                             0.00 seconds\n",
      " Time for solving problem                       0.07 seconds\n",
      " Time for solution output                       0.00 seconds\n",
      " Time for constraint functions                  0.11 seconds\n",
      " Time for objective function                    0.00 seconds\n",
      "Setting the init for x\n",
      "Settiing the init for u\n",
      " ==============================\n",
      "    SNOPT  C interface  2.2.0   \n",
      " ==============================\n",
      " S N O P T  7.7.7    (Feb 2021)\n",
      " ==============================\n",
      "\n",
      " SNMEMB EXIT 100 -- finished successfully\n",
      " SNMEMB INFO 104 -- memory requirements estimated\n",
      "\n",
      " Trial version of SNOPT -- for evaluation or academic purposes only\n",
      "\n",
      "\n",
      "\n",
      " Nonlinear constraints     304     Linear constraints       0\n",
      " Nonlinear variables       254     Linear variables         0\n",
      " Jacobian  variables       254     Objective variables    254\n",
      " Total constraints         304     Total variables        254\n",
      "\n",
      "\n",
      "\n",
      " The user has defined    1304   out of    1304   constraint gradients.\n",
      " The user has defined     254   out of     254   objective  gradients.\n",
      "\n",
      "\n",
      " Major Minors     Step   nCon Feasible  Optimal  MeritFunction     nS Penalty\n",
      "     0     35               1 (5.7E-11)(1.5E-11) 4.4790138E+03                  r\n",
      "\n",
      " SNOPTC EXIT   0 -- finished successfully\n",
      " SNOPTC INFO   1 -- optimality conditions satisfied\n",
      "\n",
      " Problem name                 solver\n",
      " No. of iterations                  35   Objective            4.4790137664E+03\n",
      " No. of major iterations             0   Linear    obj. term  0.0000000000E+00\n",
      " Penalty parameter           0.000E+00   Nonlinear obj. term  4.4790137664E+03\n",
      " User function calls (total)         2\n",
      " No. of degenerate steps            28   Percentage                      80.00\n",
      " Max x                     128 1.6E+01   Max pi                      2 6.7E+03\n",
      " Max Primal infeas         514 9.2E-10   Max Dual infeas           164 1.0E-07\n",
      " Nonlinear constraint violn    9.2E-10\n",
      "\n",
      "\n",
      "\n",
      " Solution printed on file  10\n",
      "      solver \n",
      " Time for MPS input                             0.00 seconds\n",
      " Time for solving problem                       0.07 seconds\n",
      " Time for solution output                       0.00 seconds\n",
      " :   t_proc      (avg)   t_wall      (avg)    n_eval\n",
      "   nlp_jac_f  | 139.00us ( 34.75us) 132.24us ( 33.06us)         4\n",
      "   nlp_jac_g  | 146.12ms ( 36.53ms) 145.88ms ( 36.47ms)         4\n",
      "       total  | 150.01ms (150.01ms) 149.65ms (149.65ms)         1\n",
      "Solve successfully\n",
      " Time for constraint functions                  0.11 seconds\n",
      " Time for objective function                    0.00 seconds\n",
      "Setting the init for x\n",
      "Settiing the init for u\n",
      " ==============================\n",
      "    SNOPT  C interface  2.2.0   \n",
      " ==============================\n",
      " S N O P T  7.7.7    (Feb 2021)\n",
      " ==============================\n",
      "\n",
      " SNMEMB EXIT 100 -- finished successfully\n",
      " SNMEMB INFO 104 -- memory requirements estimated\n",
      "\n",
      " Trial version of SNOPT -- for evaluation or academic purposes only\n",
      "\n",
      "\n",
      "\n",
      " Nonlinear constraints     304     Linear constraints       0\n",
      " Nonlinear variables       254     Linear variables         0\n",
      " Jacobian  variables       254     Objective variables    254\n",
      " Total constraints         304     Total variables        254\n",
      "\n",
      "\n",
      "\n",
      " The user has defined    1304   out of    1304   constraint gradients.\n",
      " The user has defined     254   out of     254   objective  gradients.\n",
      "\n",
      "\n",
      " Major Minors     Step   nCon Feasible  Optimal  MeritFunction     nS Penalty\n",
      "     0     39               1 (5.7E-11) 1.5E-05  4.6856207E+03      3           r\n",
      "     1      3  1.0E+00      2  7.4E-06  1.9E-05  4.6856213E+03      1           r\n",
      "     2      1  1.7E-01      4  8.6E-05  6.2E-03  4.6861644E+03      1         sm l\n",
      "     3      1  1.0E+00      6  2.2E-03  2.8E-03  4.6899705E+03\n",
      "     4      0  1.0E+00      7  3.6E-06 (4.7E-09) 4.6902090E+03\n",
      "     5      0  6.2E-02     12  3.4E-06 (4.4E-09) 4.6902090E+03        4.7E+02\n",
      "     6      0  6.2E-02     17  3.2E-06 (4.1E-09) 4.6902090E+03        4.7E+02   R\n",
      "     7      0  1.2E-01     27  2.8E-06 (3.6E-09) 4.6902090E+03        4.7E+02   R\n",
      "     8      0  2.5E-01     37  2.1E-06 (2.7E-09) 4.6902089E+03                  r\n",
      "     9      0  1.0E+00     38 (3.9E-14)(7.7E-16) 4.6902090E+03                  r\n",
      "\n",
      " SNOPTC EXIT   0 -- finished successfully\n",
      " SNOPTC INFO   1 -- optimality conditions satisfied\n",
      "\n",
      " Problem name                 solver\n",
      " No. of iterations                  44   Objective            4.6902089653E+03\n",
      " No. of major iterations             9   Linear    obj. term  0.0000000000E+00\n",
      " Penalty parameter           0.000E+00   Nonlinear obj. term  4.6902089653E+03\n",
      " User function calls (total)        39\n",
      " No. of degenerate steps            32   Percentage                      72.73\n",
      " Max x                     200 1.7E+01   Max pi                      2 6.2E+03\n",
      " Max Primal infeas         558 6.6E-13   Max Dual infeas            10 9.3E-13\n",
      " Nonlinear constraint violn    6.6E-13\n",
      "\n",
      "\n",
      "\n",
      " Solution printed on file  10\n",
      "      solver  :   t_proc      (avg)   t_wall      (avg)    n_eval\n",
      "   nlp_jac_f  |   1.60ms ( 38.95us)   1.49ms ( 36.23us)        41\n",
      "   nlp_jac_g  |   1.50 s ( 36.65ms)   1.50 s ( 36.64ms)        41\n",
      "       total  |   1.51 s (  1.51 s)   1.51 s (  1.51 s)         1\n",
      "Solve successfully\n",
      "\n",
      " Time for MPS input                             0.00 seconds\n",
      " Time for solving problem                       1.43 seconds\n",
      " Time for solution output                       0.00 seconds\n",
      " Time for constraint functions                  1.47 seconds\n",
      " Time for objective function                    0.00 seconds\n",
      "Setting the init for x\n",
      "Settiing the init for u\n",
      " ==============================\n",
      "    SNOPT  C interface  2.2.0   \n",
      " ==============================\n",
      " S N O P T  7.7.7    (Feb 2021)\n",
      " ==============================\n",
      "\n",
      " SNMEMB EXIT 100 -- finished successfully\n",
      " SNMEMB INFO 104 -- memory requirements estimated\n",
      "\n",
      " Trial version of SNOPT -- for evaluation or academic purposes only\n",
      "\n",
      "\n",
      "\n",
      " Nonlinear constraints     304     Linear constraints       0\n",
      " Nonlinear variables       254     Linear variables         0\n",
      " Jacobian  variables       254     Objective variables    254\n",
      " Total constraints         304     Total variables        254\n",
      "\n",
      "\n",
      "\n",
      " The user has defined    1304   out of    1304   constraint gradients.\n",
      " The user has defined     254   out of     254   objective  gradients.\n",
      "\n",
      "\n",
      " Major Minors     Step   nCon Feasible  Optimal  MeritFunction     nS Penalty\n",
      "     0     38               1 (3.9E-14) 1.4E-05  4.9094548E+03      1           r\n",
      "     1      1  1.0E+00      2  1.4E-05  2.3E-05  4.9094551E+03                  r\n",
      "     2      0  1.7E-01      4  1.9E-05  3.0E-05  4.9097035E+03                  rl\n",
      "     3      0  1.0E+00      5  4.9E-04 (5.9E-09) 4.9112873E+03                s\n",
      "     4      0  1.0E+00      6 (3.3E-15)(4.3E-16) 4.9112871E+03        6.0E+00\n",
      "\n",
      " SNOPTC EXIT   0 -- finished successfully\n",
      " SNOPTC INFO   1 -- optimality conditions satisfied\n",
      "\n",
      " Problem name                 solver\n",
      " No. of iterations                  39   Objective            4.9112870684E+03\n",
      " No. of major iterations             4   Linear    obj. term  0.0000000000E+00\n",
      " Penalty parameter           6.008E+00   Nonlinear obj. term  4.9112870684E+03\n",
      " User function calls (total)         7\n",
      " No. of degenerate steps            34   Percentage                      87.18\n",
      " Max x                     200 1.8E+01   Max pi                      2 5.7E+03\n",
      " Max Primal infeas         359 6.0E-14   Max Dual infeas             6 8.2E-13\n",
      " Nonlinear constraint violn    6.0E-14\n",
      "\n",
      "\n",
      "\n",
      " Solution printed on file  10\n",
      "      solver \n",
      " Time for MPS input                             0.00 seconds\n",
      " Time for solving problem                       0.26 seconds\n",
      " Time for solution output                       0.00 seconds\n",
      " Time for constraint functions                  0.30 seconds\n",
      " Time for objective function                    0.00 seconds\n",
      " :   t_proc      (avg)   t_wall      (avg)    n_eval\n",
      "   nlp_jac_f  | 344.00us ( 38.22us) 330.06us ( 36.67us)         9\n",
      "   nlp_jac_g  | 333.56ms ( 37.06ms) 333.29ms ( 37.03ms)         9\n",
      "       total  | 338.61ms (338.61ms) 338.12ms (338.12ms)         1\n",
      "Solve successfully\n",
      "Setting the init for x\n",
      "Settiing the init for u\n",
      " ==============================\n",
      "    SNOPT  C interface  2.2.0   \n",
      " ==============================\n",
      " S N O P T  7.7.7    (Feb 2021)\n",
      " ==============================\n",
      "\n",
      " SNMEMB EXIT 100 -- finished successfully\n",
      " SNMEMB INFO 104 -- memory requirements estimated\n",
      "\n",
      " Trial version of SNOPT -- for evaluation or academic purposes only\n",
      "\n",
      "\n",
      "\n",
      " Nonlinear constraints     304     Linear constraints       0\n",
      " Nonlinear variables       254     Linear variables         0\n",
      " Jacobian  variables       254     Objective variables    254\n",
      " Total constraints         304     Total variables        254\n",
      "\n",
      "\n",
      "\n",
      " The user has defined    1304   out of    1304   constraint gradients.\n",
      " The user has defined     254   out of     254   objective  gradients.\n",
      "\n",
      "\n",
      " Major Minors     Step   nCon Feasible  Optimal  MeritFunction     nS Penalty\n",
      "     0     37               1 (3.3E-15) 2.0E-05  5.1418851E+03      1           r\n",
      "     1      1  1.0E+00      2  1.8E-05  2.9E-05  5.1418856E+03                  r\n",
      "     2      0  1.7E-01      4  2.7E-05  5.4E-04  5.1421853E+03                sm l\n",
      "     3      0  1.0E+00      5  6.7E-04 (3.6E-09) 5.1440357E+03\n",
      "     4      0  1.0E+00      6 (3.8E-16)(8.4E-16) 5.1440357E+03        1.3E-03\n",
      "\n",
      " SNOPTC EXIT   0 -- finished successfully\n",
      " SNOPTC INFO   1 -- optimality conditions satisfied\n",
      "\n",
      " Problem name                 solver\n",
      " No. of iterations                  38   Objective            5.1440356606E+03\n",
      " No. of major iterations             4   Linear    obj. term  0.0000000000E+00\n",
      " Penalty parameter           1.301E-03   Nonlinear obj. term  5.1440356606E+03\n",
      " User function calls (total)         7\n",
      " No. of degenerate steps            34   Percentage                      89.47\n",
      " Max x                     200 1.9E+01   Max pi                      2 5.3E+03\n",
      " Max Primal infeas         538 7.1E-15   Max Dual infeas            22 2.8E-13\n",
      " Nonlinear constraint violn    7.1E-15\n",
      "\n",
      "\n",
      "\n",
      " Solution printed on file  10\n",
      "      solver  :   t_proc      (avg)   t_wall      (avg)    n_eval\n",
      "   nlp_jac_f  | 366.00us ( 40.67us) 312.66us ( 34.74us)         9\n",
      "   nlp_jac_g  | 326.11ms ( 36.23ms) 326.03ms ( 36.23ms)         9\n",
      "       total  | 331.17ms (331.17ms) 330.86ms (330.86ms)         1\n",
      "Solve successfully\n",
      "\n",
      " Time for MPS input                             0.00 seconds\n",
      " Time for solving problem                       0.26 seconds\n",
      " Time for solution output                       0.00 seconds\n",
      " Time for constraint functions                  0.29 seconds\n",
      " Time for objective function                    0.00 seconds\n",
      "Setting the init for x\n",
      "Settiing the init for u\n",
      " ==============================\n",
      "    SNOPT  C interface  2.2.0   \n",
      " ==============================\n",
      " S N O P T  7.7.7    (Feb 2021)\n",
      " ==============================\n",
      "\n",
      " SNMEMB EXIT 100 -- finished successfully\n",
      " SNMEMB INFO 104 -- memory requirements estimated\n",
      "\n",
      " Trial version of SNOPT -- for evaluation or academic purposes only\n",
      "\n",
      "\n",
      "\n",
      " Nonlinear constraints     304     Linear constraints       0\n",
      " Nonlinear variables       254     Linear variables         0\n",
      " Jacobian  variables       254     Objective variables    254\n",
      " Total constraints         304     Total variables        254\n",
      "\n",
      "\n",
      "\n",
      " The user has defined    1304   out of    1304   constraint gradients.\n",
      " The user has defined     254   out of     254   objective  gradients.\n",
      "\n",
      "\n",
      " Major Minors     Step   nCon Feasible  Optimal  MeritFunction     nS Penalty\n",
      "     0     37               1 (3.8E-16) 2.0E-05  5.3861121E+03      1           r\n",
      "     1      1  1.0E+00      2  1.4E-05  3.0E-05  5.3861125E+03                  r\n",
      "     2      0  1.7E-01      4  1.4E-05  3.9E-05  5.3863872E+03                  rl\n",
      "     3      0  1.0E+00      5  3.4E-04 (7.6E-09) 5.3881056E+03                s\n",
      "     4      0  1.0E+00      6 (2.9E-16)(4.8E-16) 5.3881054E+03        8.1E+00\n",
      "\n",
      " SNOPTC EXIT   0 -- finished successfully\n",
      " SNOPTC INFO   1 -- optimality conditions satisfied\n",
      "\n",
      " Problem name                 solver\n",
      " No. of iterations                  38   Objective            5.3881054048E+03\n",
      " No. of major iterations             4   Linear    obj. term  0.0000000000E+00\n",
      " Penalty parameter           8.051E+00   Nonlinear obj. term  5.3881054048E+03\n",
      " User function calls (total)         7\n",
      " No. of degenerate steps            34   Percentage                      89.47\n",
      " Max x                     196 1.9E+01   Max pi                      2 4.8E+03\n",
      " Max Primal infeas         442 5.3E-15   Max Dual infeas             2 3.7E-13\n",
      " Nonlinear constraint violn    5.3E-15\n",
      "\n",
      "\n",
      "\n",
      " Solution printed on file  10\n",
      "      solver  :   t_proc      (avg)   t_wall      (avg)    n_eval\n",
      "   nlp_jac_f  | 452.00us ( 50.22us) 320.59us ( 35.62us)         9\n",
      "   nlp_jac_g  | 330.92ms ( 36.77ms) 330.47ms ( 36.72ms)         9\n",
      "       total  | 336.18ms (336.18ms) 335.52ms (335.52ms)         1\n",
      "Solve successfully\n",
      "\n",
      " Time for MPS input                             0.00 seconds\n",
      " Time for solving problem                       0.26 seconds\n",
      " Time for solution output                       0.00 seconds\n",
      " Time for constraint functions                  0.29 seconds\n",
      " Time for objective function                    0.00 seconds\n",
      "Setting the init for x\n",
      "Settiing the init for u\n",
      " ==============================\n",
      "    SNOPT  C interface  2.2.0   \n",
      " ==============================\n",
      " S N O P T  7.7.7    (Feb 2021)\n",
      " ==============================\n",
      "\n",
      " SNMEMB EXIT 100 -- finished successfully\n",
      " SNMEMB INFO 104 -- memory requirements estimated\n",
      "\n",
      " Trial version of SNOPT -- for evaluation or academic purposes only\n",
      "\n",
      "\n",
      "\n",
      " Nonlinear constraints     304     Linear constraints       0\n",
      " Nonlinear variables       254     Linear variables         0\n",
      " Jacobian  variables       254     Objective variables    254\n",
      " Total constraints         304     Total variables        254\n",
      "\n",
      "\n",
      "\n",
      " The user has defined    1304   out of    1304   constraint gradients.\n",
      " The user has defined     254   out of     254   objective  gradients.\n",
      "\n",
      "\n",
      " Major Minors     Step   nCon Feasible  Optimal  MeritFunction     nS Penalty\n",
      "     0     38               1 (2.9E-16) 1.3E-05  5.6413952E+03      1           r\n",
      "     1      1  1.0E+00      2  6.3E-06  2.4E-05  5.6413953E+03                  r\n",
      "     2      0  1.7E-01      4  7.5E-06  3.2E-05  5.6415865E+03                  rl\n",
      "     3      0  1.0E+00      5  1.9E-04 (1.0E-09) 5.6428697E+03                s\n",
      "     4      0  1.0E+00      6 (7.6E-16)(1.3E-15) 5.6428697E+03        3.5E+00\n",
      "\n",
      " SNOPTC EXIT   0 -- finished successfully\n",
      " SNOPTC INFO   1 -- optimality conditions satisfied\n",
      "\n",
      " Problem name                 solver\n",
      " No. of iterations                  39   Objective            5.6428696664E+03\n",
      " No. of major iterations             4   Linear    obj. term  0.0000000000E+00\n",
      " Penalty parameter           3.496E+00   Nonlinear obj. term  5.6428696664E+03\n",
      " User function calls (total)         7\n",
      " No. of degenerate steps            34   Percentage                      87.18\n",
      " Max x                     192 1.9E+01   Max pi                      2 4.3E+03\n",
      " Max Primal infeas         550 1.4E-14   Max Dual infeas             2 3.7E-13\n",
      " Nonlinear constraint violn    1.4E-14\n",
      "\n",
      "\n",
      "\n",
      " Solution printed on file  10\n",
      "      solver  :   t_proc      (avg)   t_wall      (avg)    n_eval\n",
      "   nlp_jac_f  | 401.00us ( 44.56us) 320.61us ( 35.62us)         9\n",
      "   nlp_jac_g  | 324.78ms ( 36.09ms) 324.76ms ( 36.08ms)         9\n",
      "       total  | 329.90ms (329.90ms) 329.62ms (329.62ms)         1\n",
      "Solve successfully\n",
      "\n",
      " Time for MPS input                             0.00 seconds\n",
      " Time for solving problem                       0.25 seconds\n",
      " Time for solution output                       0.00 seconds\n",
      " Time for constraint functions                  0.29 seconds\n",
      " Time for objective function                    0.00 seconds\n",
      "Setting the init for x\n",
      "Settiing the init for u\n",
      " ==============================\n",
      "    SNOPT  C interface  2.2.0   \n",
      " ==============================\n",
      " S N O P T  7.7.7    (Feb 2021)\n",
      " ==============================\n",
      "\n",
      " SNMEMB EXIT 100 -- finished successfully\n",
      " SNMEMB INFO 104 -- memory requirements estimated\n",
      "\n",
      " Trial version of SNOPT -- for evaluation or academic purposes only\n",
      "\n",
      "\n",
      "\n",
      " Nonlinear constraints     304     Linear constraints       0\n",
      " Nonlinear variables       254     Linear variables         0\n",
      " Jacobian  variables       254     Objective variables    254\n",
      " Total constraints         304     Total variables        254\n",
      "\n",
      "\n",
      "\n",
      " The user has defined    1304   out of    1304   constraint gradients.\n",
      " The user has defined     254   out of     254   objective  gradients.\n",
      "\n",
      "\n",
      " Major Minors     Step   nCon Feasible  Optimal  MeritFunction     nS Penalty\n",
      "     0     38               1 (7.6E-16) 2.7E-06  5.9069144E+03      1           r\n",
      "     1      1  1.0E+00      2 (6.8E-07) 1.2E-05  5.9069144E+03                  r\n",
      "     2      0  1.7E-01      4  2.6E-06  1.9E-05  5.9070065E+03                  rl\n",
      "     3      0  1.0E+00      5  6.6E-05 (1.6E-10) 5.9077799E+03                sm\n",
      "     4      0  1.0E+00      6 (5.7E-16)(6.5E-16) 5.9077799E+03\n",
      "\n",
      " SNOPTC EXIT   0 -- finished successfully\n",
      " SNOPTC INFO   1 -- optimality conditions satisfied\n",
      "\n",
      " Problem name                 solver\n",
      " No. of iterations                  39   Objective            5.9077798923E+03\n",
      " No. of major iterations             4   Linear    obj. term  0.0000000000E+00\n",
      " Penalty parameter           0.000E+00   Nonlinear obj. term  5.9077798923E+03\n",
      " User function calls (total)         7\n",
      " No. of degenerate steps            34   Percentage                      87.18\n",
      " Max x                     188 1.9E+01   Max pi                      2 3.9E+03\n",
      " Max Primal infeas         546 1.1E-14   Max Dual infeas            18 2.0E-13\n",
      " Nonlinear constraint violn    1.1E-14\n",
      "\n",
      "\n",
      "\n",
      " Solution printed on file  10\n",
      "      solver  :   t_proc      (avg)   t_wall      (avg)    n_eval\n",
      "   nlp_jac_f  | 362.00us ( 40.22us) 339.26us ( 37.70us)         9\n",
      "   nlp_jac_g  | 326.74ms ( 36.30ms) 326.13ms ( 36.24ms)         9\n",
      "       total  | 332.00ms (332.00ms) 331.19ms (331.19ms)         1\n",
      "Solve successfully\n",
      "\n",
      " Time for MPS input                             0.00 seconds\n",
      " Time for solving problem                       0.26 seconds\n",
      " Time for solution output                       0.00 seconds\n",
      " Time for constraint functions                  0.29 seconds\n",
      " Time for objective function                    0.00 seconds\n",
      "Setting the init for x\n",
      "Settiing the init for u\n",
      " ==============================\n",
      "    SNOPT  C interface  2.2.0   \n",
      " ==============================\n",
      " S N O P T  7.7.7    (Feb 2021)\n",
      " ==============================\n",
      "\n",
      " SNMEMB EXIT 100 -- finished successfully\n",
      " SNMEMB INFO 104 -- memory requirements estimated\n",
      "\n",
      " Trial version of SNOPT -- for evaluation or academic purposes only\n",
      "\n",
      "\n",
      "\n",
      " Nonlinear constraints     304     Linear constraints       0\n",
      " Nonlinear variables       254     Linear variables         0\n",
      " Jacobian  variables       254     Objective variables    254\n",
      " Total constraints         304     Total variables        254\n",
      "\n",
      "\n",
      "\n",
      " The user has defined    1304   out of    1304   constraint gradients.\n",
      " The user has defined     254   out of     254   objective  gradients.\n",
      "\n",
      "\n",
      " Major Minors     Step   nCon Feasible  Optimal  MeritFunction     nS Penalty\n",
      "     0     36               1 (5.7E-16)(7.6E-16) 6.1820748E+03                  r\n",
      "\n",
      " SNOPTC EXIT   0 -- finished successfully\n",
      " SNOPTC INFO   1 -- optimality conditions satisfied\n",
      "\n",
      " Problem name                 solver\n",
      " No. of iterations                  36   Objective            6.1820748211E+03\n",
      " No. of major iterations             0   Linear    obj. term  0.0000000000E+00\n",
      " Penalty parameter           0.000E+00   Nonlinear obj. term  6.1820748211E+03\n",
      " User function calls (total)         2\n",
      " No. of degenerate steps            34   Percentage                      94.44\n",
      " Max x                     184 1.9E+01   Max pi                      2 3.5E+03\n",
      " Max Primal infeas         542 1.1E-14   Max Dual infeas           176 2.1E-12\n",
      " Nonlinear constraint violn    1.1E-14\n",
      "\n",
      "\n",
      "\n",
      " Solution printed on file  10\n",
      "      solver  :   t_proc      (avg)   t_wall      (avg)    n_eval\n",
      "   nlp_jac_f  | 151.00us ( 37.75us) 138.45us ( 34.61us)         4\n",
      "   nlp_jac_g  | 139.48ms ( 34.87ms) 139.40ms ( 34.85ms)         4\n",
      "       total  | 143.29ms (143.29ms) 143.13ms (143.13ms)         1\n",
      "Solve successfully\n",
      "\n",
      " Time for MPS input                             0.00 seconds\n",
      " Time for solving problem                       0.07 seconds\n",
      " Time for solution output                       0.00 seconds\n",
      " Time for constraint functions                  0.10 seconds\n",
      " Time for objective function                    0.00 seconds\n",
      "Setting the init for x\n",
      "Settiing the init for u\n",
      " ==============================\n",
      "    SNOPT  C interface  2.2.0   \n",
      " ==============================\n",
      " S N O P T  7.7.7    (Feb 2021)\n",
      " ==============================\n",
      "\n",
      " SNMEMB EXIT 100 -- finished successfully\n",
      " SNMEMB INFO 104 -- memory requirements estimated\n",
      "\n",
      " Trial version of SNOPT -- for evaluation or academic purposes only\n",
      "\n",
      "\n",
      "\n",
      " Nonlinear constraints     304     Linear constraints       0\n",
      " Nonlinear variables       254     Linear variables         0\n",
      " Jacobian  variables       254     Objective variables    254\n",
      " Total constraints         304     Total variables        254\n",
      "\n",
      "\n",
      "\n",
      " The user has defined    1304   out of    1304   constraint gradients.\n",
      " The user has defined     254   out of     254   objective  gradients.\n",
      "\n",
      "\n",
      " Major Minors     Step   nCon Feasible  Optimal  MeritFunction     nS Penalty\n",
      "     0     37               1 (5.7E-16) 2.6E-06  6.4655634E+03      1           r\n",
      "     1      1  1.0E+00      2 (4.1E-07) 1.5E-05  6.4655634E+03                  r\n",
      "     2      0  1.7E-01      4  1.0E-06  2.4E-05  6.4656501E+03                  rl\n",
      "     3      0  1.0E+00      5  2.6E-05 (6.7E-08) 6.4663961E+03                  r\n",
      "     4      0  1.0E+00      6 (1.5E-11)(7.6E-16) 6.4663961E+03                  r\n",
      "\n",
      " SNOPTC EXIT   0 -- finished successfully\n",
      " SNOPTC INFO   1 -- optimality conditions satisfied\n",
      "\n",
      " Problem name                 solver\n",
      " No. of iterations                  38   Objective            6.4663961397E+03\n",
      " No. of major iterations             4   Linear    obj. term  0.0000000000E+00\n",
      " Penalty parameter           0.000E+00   Nonlinear obj. term  6.4663961397E+03\n",
      " User function calls (total)         7\n",
      " No. of degenerate steps            35   Percentage                      92.11\n",
      " Max x                     180 1.9E+01   Max pi                      2 3.0E+03\n",
      " Max Primal infeas         558 2.8E-10   Max Dual infeas           204 1.9E-12\n",
      " Nonlinear constraint violn    2.8E-10\n",
      "\n",
      "\n",
      "\n",
      " Solution printed on file  10\n",
      "      solver  :   t_proc      (avg)   t_wall      (avg)    n_eval\n",
      "   nlp_jac_f  | 398.00us ( 44.22us) 351.57us ( 39.06us)         9\n",
      "   nlp_jac_g  | 317.33ms ( 35.26ms) 316.99ms ( 35.22ms)         9\n",
      "       total  | 322.42ms (322.42ms) 321.89ms (321.89ms)         1\n",
      "Solve successfully\n",
      "\n",
      " Time for MPS input                             0.00 seconds\n",
      " Time for solving problem                       0.25 seconds\n",
      " Time for solution output                       0.00 seconds\n",
      " Time for constraint functions                  0.29 seconds\n",
      " Time for objective function                    0.00 seconds\n",
      "Setting the init for x\n",
      "Settiing the init for u\n",
      " ==============================\n",
      "    SNOPT  C interface  2.2.0   \n",
      " ==============================\n",
      " S N O P T  7.7.7    (Feb 2021)\n",
      " ==============================\n",
      "\n",
      " SNMEMB EXIT 100 -- finished successfully\n",
      " SNMEMB INFO 104 -- memory requirements estimated\n",
      "\n",
      " Trial version of SNOPT -- for evaluation or academic purposes only\n",
      "\n",
      "\n",
      "\n",
      " Nonlinear constraints     304     Linear constraints       0\n",
      " Nonlinear variables       254     Linear variables         0\n",
      " Jacobian  variables       254     Objective variables    254\n",
      " Total constraints         304     Total variables        254\n",
      "\n",
      "\n",
      "\n",
      " The user has defined    1304   out of    1304   constraint gradients.\n",
      " The user has defined     254   out of     254   objective  gradients.\n",
      "\n",
      "\n",
      " Major Minors     Step   nCon Feasible  Optimal  MeritFunction     nS Penalty\n",
      "     0     35               1 (1.5E-11)(7.7E-12) 6.7599767E+03                  r\n",
      "\n",
      " SNOPTC EXIT   0 -- finished successfully\n",
      " SNOPTC INFO   1 -- optimality conditions satisfied\n",
      "\n",
      " Problem name                 solver\n",
      " No. of iterations                  35   Objective            6.7599766701E+03\n",
      " No. of major iterations             0   Linear    obj. term  0.0000000000E+00\n",
      " Penalty parameter           0.000E+00   Nonlinear obj. term  6.7599766701E+03\n",
      " User function calls (total)         2\n",
      " No. of degenerate steps            31   Percentage                      88.57\n",
      " Max x                     176 1.9E+01   Max pi                      2 2.7E+03\n",
      " Max Primal infeas         554 2.8E-10   Max Dual infeas           204 2.1E-08\n",
      " Nonlinear constraint violn    2.8E-10\n",
      "\n",
      "\n",
      "\n",
      " Solution printed on file  10\n",
      "      solver  :   t_proc      (avg)   t_wall      (avg)    n_eval\n",
      "   nlp_jac_f  | 155.00us ( 38.75us) 146.95us ( 36.74us)         4\n",
      "   nlp_jac_g  | 147.30ms ( 36.82ms) 147.13ms ( 36.78ms)         4\n",
      "       total  | 151.34ms (151.34ms) 151.09ms (151.09ms)         1\n",
      "Solve successfully\n",
      "\n",
      " Time for MPS input                             0.00 seconds\n",
      " Time for solving problem                       0.07 seconds\n",
      " Time for solution output                       0.00 seconds\n",
      " Time for constraint functions                  0.11 seconds\n",
      " Time for objective function                    0.00 seconds\n",
      "Setting the init for x\n",
      "Settiing the init for u\n",
      " ==============================\n",
      "    SNOPT  C interface  2.2.0   \n",
      " ==============================\n",
      " S N O P T  7.7.7    (Feb 2021)\n",
      " ==============================\n",
      "\n",
      " SNMEMB EXIT 100 -- finished successfully\n",
      " SNMEMB INFO 104 -- memory requirements estimated\n",
      "\n",
      " Trial version of SNOPT -- for evaluation or academic purposes only\n",
      "\n",
      "\n",
      "\n",
      " Nonlinear constraints     304     Linear constraints       0\n",
      " Nonlinear variables       254     Linear variables         0\n",
      " Jacobian  variables       254     Objective variables    254\n",
      " Total constraints         304     Total variables        254\n",
      "\n",
      "\n",
      "\n",
      " The user has defined    1304   out of    1304   constraint gradients.\n",
      " The user has defined     254   out of     254   objective  gradients.\n",
      "\n",
      "\n",
      " Major Minors     Step   nCon Feasible  Optimal  MeritFunction     nS Penalty\n",
      "     0     35               1 (1.5E-11)(9.7E-12) 7.0634587E+03                  r\n",
      "\n",
      " SNOPTC EXIT   0 -- finished successfully\n",
      " SNOPTC INFO   1 -- optimality conditions satisfied\n",
      "\n",
      " Problem name                 solver\n",
      " No. of iterations                  35   Objective            7.0634587013E+03\n",
      " No. of major iterations             0   Linear    obj. term  0.0000000000E+00\n",
      " Penalty parameter           0.000E+00   Nonlinear obj. term  7.0634587013E+03\n",
      " User function calls (total)         2\n",
      " No. of degenerate steps            31   Percentage                      88.57\n",
      " Max x                     172 1.9E+01   Max pi                      2 2.3E+03\n",
      " Max Primal infeas         550 2.8E-10   Max Dual infeas           204 2.2E-08\n",
      " Nonlinear constraint violn    2.8E-10\n",
      "\n",
      "\n",
      "\n",
      " Solution printed on file  10\n",
      "      solver \n",
      " :   t_proc      (avg)   t_wall      (avg)    n_eval\n",
      "   nlp_jac_f  | 231.00us ( 57.75us) 186.35us ( 46.59us)         4\n",
      "   nlp_jac_g  | 155.30ms ( 38.82ms) 155.22ms ( 38.81ms)         4\n",
      "       total  | 159.58ms (159.58ms) 159.39ms (159.39ms)         1\n",
      "Solve successfully\n",
      " Time for MPS input                             0.00 seconds\n",
      " Time for solving problem                       0.08 seconds\n",
      " Time for solution output                       0.00 seconds\n",
      " Time for constraint functions                  0.12 seconds\n",
      " Time for objective function                    0.00 seconds\n",
      "Setting the init for x\n",
      "Settiing the init for u\n",
      " ==============================\n",
      "    SNOPT  C interface  2.2.0   \n",
      " ==============================\n",
      " S N O P T  7.7.7    (Feb 2021)\n",
      " ==============================\n",
      "\n",
      " SNMEMB EXIT 100 -- finished successfully\n",
      " SNMEMB INFO 104 -- memory requirements estimated\n",
      "\n",
      " Trial version of SNOPT -- for evaluation or academic purposes only\n",
      "\n",
      "\n",
      "\n",
      " Nonlinear constraints     304     Linear constraints       0\n",
      " Nonlinear variables       254     Linear variables         0\n",
      " Jacobian  variables       254     Objective variables    254\n",
      " Total constraints         304     Total variables        254\n",
      "\n",
      "\n",
      "\n",
      " The user has defined    1304   out of    1304   constraint gradients.\n",
      " The user has defined     254   out of     254   objective  gradients.\n",
      "\n",
      "\n",
      " Major Minors     Step   nCon Feasible  Optimal  MeritFunction     nS Penalty\n",
      "     0     35               1 (1.5E-11)(1.2E-11) 7.3773881E+03                  r\n",
      "\n",
      " SNOPTC EXIT   0 -- finished successfully\n",
      " SNOPTC INFO   1 -- optimality conditions satisfied\n",
      "\n",
      " Problem name                 solver\n",
      " No. of iterations                  35   Objective            7.3773881353E+03\n",
      " No. of major iterations             0   Linear    obj. term  0.0000000000E+00\n",
      " Penalty parameter           0.000E+00   Nonlinear obj. term  7.3773881353E+03\n",
      " User function calls (total)         2\n",
      " No. of degenerate steps            31   Percentage                      88.57\n",
      " Max x                     202 1.9E+01   Max pi                      2 2.0E+03\n",
      " Max Primal infeas         546 2.8E-10   Max Dual infeas           204 2.3E-08\n",
      " Nonlinear constraint violn    2.8E-10\n",
      "\n",
      "\n",
      "\n",
      " Solution printed on file  10\n",
      "      solver  :   t_proc      (avg)   t_wall      (avg)    n_eval\n",
      "   nlp_jac_f  | 160.00us ( 40.00us) 152.41us ( 38.10us)         4\n",
      "   nlp_jac_g  | 152.85ms ( 38.21ms) 152.78ms ( 38.19ms)         4\n",
      "       total  | 157.06ms (157.06ms) 156.85ms (156.85ms)         1\n",
      "Solve successfully\n",
      "\n",
      " Time for MPS input                             0.00 seconds\n",
      " Time for solving problem                       0.08 seconds\n",
      " Time for solution output                       0.00 seconds\n",
      " Time for constraint functions                  0.11 seconds\n",
      " Time for objective function                    0.00 seconds\n",
      "Setting the init for x\n",
      "Settiing the init for u\n",
      " ==============================\n",
      "    SNOPT  C interface  2.2.0   \n",
      " ==============================\n",
      " S N O P T  7.7.7    (Feb 2021)\n",
      " ==============================\n",
      "\n",
      " SNMEMB EXIT 100 -- finished successfully\n",
      " SNMEMB INFO 104 -- memory requirements estimated\n",
      "\n",
      " Trial version of SNOPT -- for evaluation or academic purposes only\n",
      "\n",
      "\n",
      "\n",
      " Nonlinear constraints     304     Linear constraints       0\n",
      " Nonlinear variables       254     Linear variables         0\n",
      " Jacobian  variables       254     Objective variables    254\n",
      " Total constraints         304     Total variables        254\n",
      "\n",
      "\n",
      "\n",
      " The user has defined    1304   out of    1304   constraint gradients.\n",
      " The user has defined     254   out of     254   objective  gradients.\n",
      "\n",
      "\n",
      " Major Minors     Step   nCon Feasible  Optimal  MeritFunction     nS Penalty\n",
      "     0     34               1 (1.5E-11)(1.4E-11) 7.7023456E+03                  r\n",
      "\n",
      " SNOPTC EXIT   0 -- finished successfully\n",
      " SNOPTC INFO   1 -- optimality conditions satisfied\n",
      "\n",
      " Problem name                 solver\n",
      " No. of iterations                  34   Objective            7.7023455687E+03\n",
      " No. of major iterations             0   Linear    obj. term  0.0000000000E+00\n",
      " Penalty parameter           0.000E+00   Nonlinear obj. term  7.7023455687E+03\n",
      " User function calls (total)         2\n",
      " No. of degenerate steps            30   Percentage                      88.24\n",
      " Max x                     202 1.9E+01   Max pi                      2 1.6E+03\n",
      " Max Primal infeas         542 2.8E-10   Max Dual infeas           200 2.4E-08\n",
      " Nonlinear constraint violn    2.8E-10\n",
      "\n",
      "\n",
      "\n",
      " Solution printed on file  10\n",
      "      solver  :   t_proc      (avg)   t_wall      (avg)    n_eval\n",
      "   nlp_jac_f  | 158.00us ( 39.50us) 151.09us ( 37.77us)         4\n",
      "   nlp_jac_g  | 149.13ms ( 37.28ms) 148.83ms ( 37.21ms)         4\n",
      "       total  | 153.27ms (153.27ms) 152.81ms (152.81ms)         1\n",
      "Solve successfully\n",
      "\n",
      " Time for MPS input                             0.00 seconds\n",
      " Time for solving problem                       0.08 seconds\n",
      " Time for solution output                       0.00 seconds\n",
      " Time for constraint functions                  0.11 seconds\n",
      " Time for objective function                    0.00 seconds\n",
      "Setting the init for x\n",
      "Settiing the init for u\n",
      " ==============================\n",
      "    SNOPT  C interface  2.2.0   \n",
      " ==============================\n",
      " S N O P T  7.7.7    (Feb 2021)\n",
      " ==============================\n",
      "\n",
      " SNMEMB EXIT 100 -- finished successfully\n",
      " SNMEMB INFO 104 -- memory requirements estimated\n",
      "\n",
      " Trial version of SNOPT -- for evaluation or academic purposes only\n",
      "\n",
      "\n",
      "\n",
      " Nonlinear constraints     304     Linear constraints       0\n",
      " Nonlinear variables       254     Linear variables         0\n",
      " Jacobian  variables       254     Objective variables    254\n",
      " Total constraints         304     Total variables        254\n",
      "\n",
      "\n",
      "\n",
      " The user has defined    1304   out of    1304   constraint gradients.\n",
      " The user has defined     254   out of     254   objective  gradients.\n",
      "\n",
      "\n",
      " Major Minors     Step   nCon Feasible  Optimal  MeritFunction     nS Penalty\n",
      "     0     35               1 (1.4E-11)(1.4E-11) 8.0386955E+03                  r\n",
      "\n",
      " SNOPTC EXIT   0 -- finished successfully\n",
      " SNOPTC INFO   1 -- optimality conditions satisfied\n",
      "\n",
      " Problem name                 solver\n",
      " No. of iterations                  35   Objective            8.0386955252E+03\n",
      " No. of major iterations             0   Linear    obj. term  0.0000000000E+00\n",
      " Penalty parameter           0.000E+00   Nonlinear obj. term  8.0386955252E+03\n",
      " User function calls (total)         2\n",
      " No. of degenerate steps            29   Percentage                      82.86\n",
      " Max x                     202 1.9E+01   Max pi                    186 1.7E+03\n",
      " Max Primal infeas         538 2.8E-10   Max Dual infeas           196 2.4E-08\n",
      " Nonlinear constraint violn    2.8E-10\n",
      "\n",
      "\n",
      "\n",
      " Solution printed on file  10\n",
      "      solver  :   t_proc      (avg)   t_wall      (avg)    n_eval\n",
      "   nlp_jac_f  | 190.00us ( 47.50us) 152.12us ( 38.03us)         4\n",
      "   nlp_jac_g  | 149.97ms ( 37.49ms) 149.76ms ( 37.44ms)         4\n",
      "       total  | 154.10ms (154.10ms) 153.73ms (153.73ms)         1\n",
      "Solve successfully\n",
      "\n",
      " Time for MPS input                             0.00 seconds\n",
      " Time for solving problem                       0.08 seconds\n",
      " Time for solution output                       0.00 seconds\n",
      " Time for constraint functions                  0.11 seconds\n",
      " Time for objective function                    0.00 seconds\n",
      "Setting the init for x\n",
      "Settiing the init for u\n",
      " ==============================\n",
      "    SNOPT  C interface  2.2.0   \n",
      " ==============================\n",
      " S N O P T  7.7.7    (Feb 2021)\n",
      " ==============================\n",
      "\n",
      " SNMEMB EXIT 100 -- finished successfully\n",
      " SNMEMB INFO 104 -- memory requirements estimated\n",
      "\n",
      " Trial version of SNOPT -- for evaluation or academic purposes only\n",
      "\n",
      "\n",
      "\n",
      " Nonlinear constraints     304     Linear constraints       0\n",
      " Nonlinear variables       254     Linear variables         0\n",
      " Jacobian  variables       254     Objective variables    254\n",
      " Total constraints         304     Total variables        254\n",
      "\n",
      "\n",
      "\n",
      " The user has defined    1304   out of    1304   constraint gradients.\n",
      " The user has defined     254   out of     254   objective  gradients.\n",
      "\n",
      "\n",
      " Major Minors     Step   nCon Feasible  Optimal  MeritFunction     nS Penalty\n",
      "     0     36               1 (1.4E-11)(1.3E-11) 8.3864465E+03                  r\n",
      "\n",
      " SNOPTC EXIT   0 -- finished successfully\n",
      " SNOPTC INFO   1 -- optimality conditions satisfied\n",
      "\n",
      " Problem name                 solver\n",
      " No. of iterations                  36   Objective            8.3864465224E+03\n",
      " No. of major iterations             0   Linear    obj. term  0.0000000000E+00\n",
      " Penalty parameter           0.000E+00   Nonlinear obj. term  8.3864465224E+03\n",
      " User function calls (total)         2\n",
      " No. of degenerate steps            31   Percentage                      86.11\n",
      " Max x                     202 2.0E+01   Max pi                    182 1.8E+03\n",
      " Max Primal infeas         534 2.8E-10   Max Dual infeas           192 2.5E-08\n",
      " Nonlinear constraint violn    2.8E-10\n",
      "\n",
      "\n",
      "\n",
      " Solution printed on file  10\n",
      "      solver  :   t_proc      (avg)   t_wall      (avg)    n_eval\n",
      "   nlp_jac_f  | 157.00us ( 39.25us) 152.22us ( 38.05us)         4\n",
      "   nlp_jac_g  | 151.11ms ( 37.78ms) 150.93ms ( 37.73ms)         4\n",
      "       total  | 155.19ms (155.19ms) 154.94ms (154.94ms)         1\n",
      "Solve successfully\n",
      "\n",
      " Time for MPS input                             0.00 seconds\n",
      " Time for solving problem                       0.08 seconds\n",
      " Time for solution output                       0.00 seconds\n",
      " Time for constraint functions                  0.11 seconds\n",
      " Time for objective function                    0.00 seconds\n",
      "Setting the init for x\n",
      "Settiing the init for u\n",
      " ==============================\n",
      "    SNOPT  C interface  2.2.0   \n",
      " ==============================\n",
      " S N O P T  7.7.7    (Feb 2021)\n",
      " ==============================\n",
      "\n",
      " SNMEMB EXIT 100 -- finished successfully\n",
      " SNMEMB INFO 104 -- memory requirements estimated\n",
      "\n",
      " Trial version of SNOPT -- for evaluation or academic purposes only\n",
      "\n",
      "\n",
      "\n",
      " Nonlinear constraints     304     Linear constraints       0\n",
      " Nonlinear variables       254     Linear variables         0\n",
      " Jacobian  variables       254     Objective variables    254\n",
      " Total constraints         304     Total variables        254\n",
      "\n",
      "\n",
      "\n",
      " The user has defined    1304   out of    1304   constraint gradients.\n",
      " The user has defined     254   out of     254   objective  gradients.\n",
      "\n",
      "\n",
      " Major Minors     Step   nCon Feasible  Optimal  MeritFunction     nS Penalty\n",
      "     0     37               1 (1.4E-11)(1.3E-11) 8.7453872E+03                  r\n",
      "\n",
      " SNOPTC EXIT   0 -- finished successfully\n",
      " SNOPTC INFO   1 -- optimality conditions satisfied\n",
      "\n",
      " Problem name                 solver\n",
      " No. of iterations                  37   Objective            8.7453872430E+03\n",
      " No. of major iterations             0   Linear    obj. term  0.0000000000E+00\n",
      " Penalty parameter           0.000E+00   Nonlinear obj. term  8.7453872430E+03\n",
      " User function calls (total)         2\n",
      " No. of degenerate steps            30   Percentage                      81.08\n",
      " Max x                     202 2.0E+01   Max pi                    182 1.9E+03\n",
      " Max Primal infeas         530 2.8E-10   Max Dual infeas           188 2.5E-08\n",
      " Nonlinear constraint violn    2.8E-10\n",
      "\n",
      "\n",
      "\n",
      " Solution printed on file  10\n",
      "      solver  :   t_proc      (avg)   t_wall      (avg)    n_eval\n",
      "   nlp_jac_f  | 200.00us ( 50.00us) 188.67us ( 47.17us)         4\n",
      "   nlp_jac_g  | 170.10ms ( 42.52ms) 170.26ms ( 42.57ms)         4\n",
      "       total  | 174.38ms (174.38ms) 174.45ms (174.45ms)         1\n",
      "Solve successfully\n",
      "\n",
      " Time for MPS input                             0.00 seconds\n",
      " Time for solving problem                       0.08 seconds\n",
      " Time for solution output                       0.00 seconds\n",
      " Time for constraint functions                  0.13 seconds\n",
      " Time for objective function                    0.00 seconds\n",
      "Setting the init for x\n",
      "Settiing the init for u\n",
      " ==============================\n",
      "    SNOPT  C interface  2.2.0   \n",
      " ==============================\n",
      " S N O P T  7.7.7    (Feb 2021)\n",
      " ==============================\n",
      "\n",
      " SNMEMB EXIT 100 -- finished successfully\n",
      " SNMEMB INFO 104 -- memory requirements estimated\n",
      "\n",
      " Trial version of SNOPT -- for evaluation or academic purposes only\n",
      "\n",
      "\n",
      "\n",
      " Nonlinear constraints     304     Linear constraints       0\n",
      " Nonlinear variables       254     Linear variables         0\n",
      " Jacobian  variables       254     Objective variables    254\n",
      " Total constraints         304     Total variables        254\n",
      "\n",
      "\n",
      "\n",
      " The user has defined    1304   out of    1304   constraint gradients.\n",
      " The user has defined     254   out of     254   objective  gradients.\n",
      "\n",
      "\n",
      " Major Minors     Step   nCon Feasible  Optimal  MeritFunction     nS Penalty\n",
      "     0     36               1 (1.4E-11)(1.3E-11) 9.1152938E+03                  r\n",
      "\n",
      " SNOPTC EXIT   0 -- finished successfully\n",
      " SNOPTC INFO   1 -- optimality conditions satisfied\n",
      "\n",
      " Problem name                 solver\n",
      " No. of iterations                  36   Objective            9.1152937549E+03\n",
      " No. of major iterations             0   Linear    obj. term  0.0000000000E+00\n",
      " Penalty parameter           0.000E+00   Nonlinear obj. term  9.1152937549E+03\n",
      " User function calls (total)         2\n",
      " No. of degenerate steps            32   Percentage                      88.89\n",
      " Max x                     202 2.0E+01   Max pi                    178 2.0E+03\n",
      " Max Primal infeas         526 2.8E-10   Max Dual infeas           184 2.6E-08\n",
      " Nonlinear constraint violn    2.8E-10\n",
      "\n",
      "\n",
      "\n",
      " Solution printed on file  10\n",
      "      solver  :   t_proc      (avg)   t_wall      (avg)    n_eval\n",
      "   nlp_jac_f  | 161.00us ( 40.25us) 150.88us ( 37.72us)         4\n",
      "   nlp_jac_g  | 146.85ms ( 36.71ms) 146.95ms ( 36.74ms)         4\n",
      "       total  | 150.92ms (150.92ms) 159.74ms (159.74ms)         1\n",
      "Solve successfully\n",
      "\n",
      " Time for MPS input                             0.00 seconds\n",
      " Time for solving problem                       0.08 seconds\n",
      " Time for solution output                       0.00 seconds\n",
      " Time for constraint functions                  0.11 seconds\n",
      " Time for objective function                    0.00 seconds\n",
      "Setting the init for x\n",
      "Settiing the init for u\n",
      " ==============================\n",
      "    SNOPT  C interface  2.2.0   \n",
      " ==============================\n",
      " S N O P T  7.7.7    (Feb 2021)\n",
      " ==============================\n",
      "\n",
      " SNMEMB EXIT 100 -- finished successfully\n",
      " SNMEMB INFO 104 -- memory requirements estimated\n",
      "\n",
      " Trial version of SNOPT -- for evaluation or academic purposes only\n",
      "\n",
      "\n",
      "\n",
      " Nonlinear constraints     304     Linear constraints       0\n",
      " Nonlinear variables       254     Linear variables         0\n",
      " Jacobian  variables       254     Objective variables    254\n",
      " Total constraints         304     Total variables        254\n",
      "\n",
      "\n",
      "\n",
      " The user has defined    1304   out of    1304   constraint gradients.\n",
      " The user has defined     254   out of     254   objective  gradients.\n",
      "\n",
      "\n",
      " Major Minors     Step   nCon Feasible  Optimal  MeritFunction     nS Penalty\n",
      "     0     37               1 (1.3E-11)(1.2E-11) 9.4960194E+03                  r\n",
      "\n",
      " SNOPTC EXIT   0 -- finished successfully\n",
      " SNOPTC INFO   1 -- optimality conditions satisfied\n",
      "\n",
      " Problem name                 solver\n",
      " No. of iterations                  37   Objective            9.4960193987E+03\n",
      " No. of major iterations             0   Linear    obj. term  0.0000000000E+00\n",
      " Penalty parameter           0.000E+00   Nonlinear obj. term  9.4960193987E+03\n",
      " User function calls (total)         2\n",
      " No. of degenerate steps            33   Percentage                      89.19\n",
      " Max x                     202 2.1E+01   Max pi                    174 2.1E+03\n",
      " Max Primal infeas         522 2.8E-10   Max Dual infeas           180 2.6E-08\n",
      " Nonlinear constraint violn    2.8E-10\n",
      "\n",
      "\n",
      "\n",
      " Solution printed on file  10\n",
      "      solver  :   t_proc      (avg)   t_wall      (avg)    n_eval\n",
      "   nlp_jac_f  | 164.00us ( 41.00us) 156.91us ( 39.23us)         4\n",
      "   nlp_jac_g  | 151.06ms ( 37.76ms) 149.94ms ( 37.48ms)         4\n",
      "       total  | 155.28ms (155.28ms) 154.09ms (154.09ms)         1\n",
      "Solve successfully\n",
      "\n",
      " Time for MPS input                             0.00 seconds\n",
      " Time for solving problem                       0.07 seconds\n",
      " Time for solution output                       0.00 seconds\n",
      " Time for constraint functions                  0.11 seconds\n",
      " Time for objective function                    0.00 seconds\n",
      "Setting the init for x\n",
      "Settiing the init for u\n",
      " ==============================\n",
      "    SNOPT  C interface  2.2.0   \n",
      " ==============================\n",
      " S N O P T  7.7.7    (Feb 2021)\n",
      " ==============================\n",
      "\n",
      " SNMEMB EXIT 100 -- finished successfully\n",
      " SNMEMB INFO 104 -- memory requirements estimated\n",
      "\n",
      " Trial version of SNOPT -- for evaluation or academic purposes only\n",
      "\n",
      "\n",
      "\n",
      " Nonlinear constraints     304     Linear constraints       0\n",
      " Nonlinear variables       254     Linear variables         0\n",
      " Jacobian  variables       254     Objective variables    254\n",
      " Total constraints         304     Total variables        254\n",
      "\n",
      "\n",
      "\n",
      " The user has defined    1304   out of    1304   constraint gradients.\n",
      " The user has defined     254   out of     254   objective  gradients.\n",
      "\n",
      "\n",
      " Major Minors     Step   nCon Feasible  Optimal  MeritFunction     nS Penalty\n",
      "     0     38               1 (1.3E-11)(1.2E-11) 9.8874938E+03                  r\n",
      "\n",
      " SNOPTC EXIT   0 -- finished successfully\n",
      " SNOPTC INFO   1 -- optimality conditions satisfied\n",
      "\n",
      " Problem name                 solver\n",
      " No. of iterations                  38   Objective            9.8874937670E+03\n",
      " No. of major iterations             0   Linear    obj. term  0.0000000000E+00\n",
      " Penalty parameter           0.000E+00   Nonlinear obj. term  9.8874937670E+03\n",
      " User function calls (total)         2\n",
      " No. of degenerate steps            34   Percentage                      89.47\n",
      " Max x                     202 2.1E+01   Max pi                    170 2.3E+03\n",
      " Max Primal infeas         518 2.8E-10   Max Dual infeas           176 2.7E-08\n",
      " Nonlinear constraint violn    2.8E-10\n",
      "\n",
      "\n",
      "\n",
      " Solution printed on file  10\n",
      "      solver  :   t_proc      (avg)   t_wall      (avg)    n_eval\n",
      "   nlp_jac_f  | 149.00us ( 37.25us) 139.06us ( 34.76us)         4\n",
      "   nlp_jac_g  | 151.59ms ( 37.90ms) 149.77ms ( 37.44ms)         4\n",
      "       total  | 155.67ms (155.67ms) 153.73ms (153.73ms)         1\n",
      "Solve successfully\n",
      "\n",
      " Time for MPS input                             0.00 seconds\n",
      " Time for solving problem                       0.08 seconds\n",
      " Time for solution output                       0.00 seconds\n",
      " Time for constraint functions                  0.11 seconds\n",
      " Time for objective function                    0.00 seconds\n",
      "Setting the init for x\n",
      "Settiing the init for u\n",
      " ==============================\n",
      "    SNOPT  C interface  2.2.0   \n",
      " ==============================\n",
      " S N O P T  7.7.7    (Feb 2021)\n",
      " ==============================\n",
      "\n",
      " SNMEMB EXIT 100 -- finished successfully\n",
      " SNMEMB INFO 104 -- memory requirements estimated\n",
      "\n",
      " Trial version of SNOPT -- for evaluation or academic purposes only\n",
      "\n",
      "\n",
      "\n",
      " Nonlinear constraints     304     Linear constraints       0\n",
      " Nonlinear variables       254     Linear variables         0\n",
      " Jacobian  variables       254     Objective variables    254\n",
      " Total constraints         304     Total variables        254\n",
      "\n",
      "\n",
      "\n",
      " The user has defined    1304   out of    1304   constraint gradients.\n",
      " The user has defined     254   out of     254   objective  gradients.\n",
      "\n",
      "\n",
      " Major Minors     Step   nCon Feasible  Optimal  MeritFunction     nS Penalty\n",
      "     0     38               1 (1.3E-11)(1.2E-11) 1.0289660E+04                  r\n",
      "\n",
      " SNOPTC EXIT   0 -- finished successfully\n",
      " SNOPTC INFO   1 -- optimality conditions satisfied\n",
      "\n",
      " Problem name                 solver\n",
      " No. of iterations                  38   Objective            1.0289660232E+04\n",
      " No. of major iterations             0   Linear    obj. term  0.0000000000E+00\n",
      " Penalty parameter           0.000E+00   Nonlinear obj. term  1.0289660232E+04\n",
      " User function calls (total)         2\n",
      " No. of degenerate steps            34   Percentage                      89.47\n",
      " Max x                     202 2.1E+01   Max pi                    166 2.4E+03\n",
      " Max Primal infeas         514 2.8E-10   Max Dual infeas           172 2.7E-08\n",
      " Nonlinear constraint violn    2.8E-10\n",
      "\n",
      "\n",
      "\n",
      " Solution printed on file  10\n",
      "      solver  :   t_proc      (avg)   t_wall      (avg)    n_eval\n",
      "   nlp_jac_f  | 203.00us ( 50.75us) 161.21us ( 40.30us)         4\n",
      "   nlp_jac_g  | 155.24ms ( 38.81ms) 154.91ms ( 38.73ms)         4\n",
      "       total  | 159.39ms (159.39ms) 158.93ms (158.93ms)         1\n",
      "Solve successfully\n",
      "\n",
      " Time for MPS input                             0.00 seconds\n",
      " Time for solving problem                       0.08 seconds\n",
      " Time for solution output                       0.00 seconds\n",
      " Time for constraint functions                  0.12 seconds\n",
      " Time for objective function                    0.00 seconds\n",
      "Setting the init for x\n",
      "Settiing the init for u\n",
      " ==============================\n",
      "    SNOPT  C interface  2.2.0   \n",
      " ==============================\n",
      " S N O P T  7.7.7    (Feb 2021)\n",
      " ==============================\n",
      "\n",
      " SNMEMB EXIT 100 -- finished successfully\n",
      " SNMEMB INFO 104 -- memory requirements estimated\n",
      "\n",
      " Trial version of SNOPT -- for evaluation or academic purposes only\n",
      "\n",
      "\n",
      "\n",
      " Nonlinear constraints     304     Linear constraints       0\n",
      " Nonlinear variables       254     Linear variables         0\n",
      " Jacobian  variables       254     Objective variables    254\n",
      " Total constraints         304     Total variables        254\n",
      "\n",
      "\n",
      "\n",
      " The user has defined    1304   out of    1304   constraint gradients.\n",
      " The user has defined     254   out of     254   objective  gradients.\n",
      "\n",
      "\n",
      " Major Minors     Step   nCon Feasible  Optimal  MeritFunction     nS Penalty\n",
      "     0     42               1 (1.3E-11) 3.3E-05  1.0702329E+04      2           r\n",
      "     1      2  1.0E+00      2  2.8E-06  4.5E-05  1.0702330E+04                  r\n",
      "     2      0  1.7E-01      4  3.2E-05  2.3E-02  1.0702731E+04                sm l\n",
      "     3      0  1.0E+00      5  7.5E-04  9.2E-06  1.0705426E+04                 m\n",
      "     4      0  1.0E+00      6 (2.5E-09)(1.2E-13) 1.0705426E+04\n",
      "\n",
      " SNOPTC EXIT   0 -- finished successfully\n",
      " SNOPTC INFO   1 -- optimality conditions satisfied\n",
      "\n",
      " Problem name                 solver\n",
      " No. of iterations                  44   Objective            1.0705426193E+04\n",
      " No. of major iterations             4   Linear    obj. term  0.0000000000E+00\n",
      " Penalty parameter           0.000E+00   Nonlinear obj. term  1.0705426193E+04\n",
      " User function calls (total)         7\n",
      " No. of degenerate steps            31   Percentage                      70.45\n",
      " Max x                     202 2.2E+01   Max pi                    162 2.5E+03\n",
      " Max Primal infeas         557 5.3E-08   Max Dual infeas           194 2.9E-10\n",
      " Nonlinear constraint violn    5.3E-08\n",
      "\n",
      "\n",
      "\n",
      " Solution printed on file  10\n",
      "      solver  :   t_proc      (avg)   t_wall      (avg)    n_eval\n",
      "   nlp_jac_f  | 435.00us ( 48.33us) 345.19us ( 38.35us)         9\n",
      "   nlp_jac_g  | 332.72ms ( 36.97ms) 331.53ms ( 36.84ms)         9\n",
      "       total  | 338.03ms (338.03ms) 336.58ms (336.58ms)         1\n",
      "Solve successfully\n",
      "\n",
      " Time for MPS input                             0.00 seconds\n",
      " Time for solving problem                       0.26 seconds\n",
      " Time for solution output                       0.00 seconds\n",
      " Time for constraint functions                  0.30 seconds\n",
      " Time for objective function                    0.00 seconds\n",
      "Setting the init for x\n",
      "Settiing the init for u\n",
      " ==============================\n",
      "    SNOPT  C interface  2.2.0   \n",
      " ==============================\n",
      " S N O P T  7.7.7    (Feb 2021)\n",
      " ==============================\n",
      "\n",
      " SNMEMB EXIT 100 -- finished successfully\n",
      " SNMEMB INFO 104 -- memory requirements estimated\n",
      "\n",
      " Trial version of SNOPT -- for evaluation or academic purposes only\n",
      "\n",
      "\n",
      "\n",
      " Nonlinear constraints     304     Linear constraints       0\n",
      " Nonlinear variables       254     Linear variables         0\n",
      " Jacobian  variables       254     Objective variables    254\n",
      " Total constraints         304     Total variables        254\n",
      "\n",
      "\n",
      "\n",
      " The user has defined    1304   out of    1304   constraint gradients.\n",
      " The user has defined     254   out of     254   objective  gradients.\n",
      "\n",
      "\n",
      " Major Minors     Step   nCon Feasible  Optimal  MeritFunction     nS Penalty\n",
      "     0     43               1 (2.4E-09) 4.0E-05  1.1132137E+04      1           r\n",
      "     1      1  1.0E+00      2  8.0E-06  6.0E-05  1.1132138E+04                  r\n",
      "     2      0  1.7E-01      4  1.0E-05  7.7E-05  1.1132433E+04                  rl\n",
      "     3      0  1.0E+00      5  2.9E-04 (1.9E-08) 1.1134247E+04                s\n",
      "     4      0  1.0E+00      6 (4.6E-15)(1.7E-15) 1.1134247E+04        9.5E+00\n",
      "\n",
      " SNOPTC EXIT   0 -- finished successfully\n",
      " SNOPTC INFO   1 -- optimality conditions satisfied\n",
      "\n",
      " Problem name                 solver\n",
      " No. of iterations                  44   Objective            1.1134247230E+04\n",
      " No. of major iterations             4   Linear    obj. term  0.0000000000E+00\n",
      " Penalty parameter           9.492E+00   Nonlinear obj. term  1.1134247230E+04\n",
      " User function calls (total)         7\n",
      " No. of degenerate steps            33   Percentage                      75.00\n",
      " Max x                     202 2.2E+01   Max pi                    158 2.6E+03\n",
      " Max Primal infeas         363 1.0E-13   Max Dual infeas            70 2.2E-13\n",
      " Nonlinear constraint violn    1.0E-13\n",
      "\n",
      "\n",
      "\n",
      " Solution printed on file  10\n",
      "      solver  :   t_proc      (avg)   t_wall      (avg)    n_eval\n",
      "   nlp_jac_f  | 343.00us ( 38.11us) 338.65us ( 37.63us)         9\n",
      "   nlp_jac_g  | 328.49ms ( 36.50ms) 326.70ms ( 36.30ms)         9\n",
      "       total  | 333.59ms (333.59ms) 331.58ms (331.58ms)         1\n",
      "Solve successfully\n",
      "\n",
      " Time for MPS input                             0.00 seconds\n",
      " Time for solving problem                       0.25 seconds\n",
      " Time for solution output                       0.00 seconds\n",
      " Time for constraint functions                  0.29 seconds\n",
      " Time for objective function                    0.00 seconds\n",
      "Setting the init for x\n",
      "Settiing the init for u\n",
      " ==============================\n",
      "    SNOPT  C interface  2.2.0   \n",
      " ==============================\n",
      " S N O P T  7.7.7    (Feb 2021)\n",
      " ==============================\n",
      "\n",
      " SNMEMB EXIT 100 -- finished successfully\n",
      " SNMEMB INFO 104 -- memory requirements estimated\n",
      "\n",
      " Trial version of SNOPT -- for evaluation or academic purposes only\n",
      "\n",
      "\n",
      "\n",
      " Nonlinear constraints     304     Linear constraints       0\n",
      " Nonlinear variables       254     Linear variables         0\n",
      " Jacobian  variables       254     Objective variables    254\n",
      " Total constraints         304     Total variables        254\n",
      "\n",
      "\n",
      "\n",
      " The user has defined    1304   out of    1304   constraint gradients.\n",
      " The user has defined     254   out of     254   objective  gradients.\n",
      "\n",
      "\n",
      " Major Minors     Step   nCon Feasible  Optimal  MeritFunction     nS Penalty\n",
      "     0     43               1 (4.6E-15) 5.3E-05  1.1574760E+04      1           r\n",
      "     1      1  1.0E+00      2  1.3E-05  7.3E-05  1.1574761E+04                  r\n",
      "     2      0  1.7E-01      4  2.3E-05  1.7E-03  1.1575149E+04                sm l\n",
      "     3      0  1.0E+00      5  5.8E-04 (9.5E-09) 1.1577439E+04\n",
      "     4      0  1.0E+00      6 (4.7E-16)(1.8E-15) 1.1577439E+04        1.7E-03\n",
      "\n",
      " SNOPTC EXIT   0 -- finished successfully\n",
      " SNOPTC INFO   1 -- optimality conditions satisfied\n",
      "\n",
      " Problem name                 solver\n",
      " No. of iterations                  44   Objective            1.1577439335E+04\n",
      " No. of major iterations             4   Linear    obj. term  0.0000000000E+00\n",
      " Penalty parameter           1.670E-03   Nonlinear obj. term  1.1577439335E+04\n",
      " User function calls (total)         7\n",
      " No. of degenerate steps            35   Percentage                      79.55\n",
      " Max x                     202 2.3E+01   Max pi                    154 2.8E+03\n",
      " Max Primal infeas         544 1.1E-14   Max Dual infeas            42 2.5E-13\n",
      " Nonlinear constraint violn    1.1E-14\n",
      "\n",
      "\n",
      "\n",
      " Solution printed on file  10\n",
      "      solver \n",
      " :   t_proc      (avg)   t_wall      (avg)    n_eval\n",
      "   nlp_jac_f  | 425.00us ( 47.22us) 345.90us ( 38.43us)         9\n",
      "   nlp_jac_g  | 319.54ms ( 35.50ms) 319.57ms ( 35.51ms)         9\n",
      "       total  | 324.71ms (324.71ms) 324.46ms (324.46ms)         1\n",
      "Solve successfully\n",
      " Time for MPS input                             0.00 seconds\n",
      " Time for solving problem                       0.25 seconds\n",
      " Time for solution output                       0.00 seconds\n",
      " Time for constraint functions                  0.29 seconds\n",
      " Time for objective function                    0.00 seconds\n",
      "Setting the init for x\n",
      "Settiing the init for u\n",
      " ==============================\n",
      "    SNOPT  C interface  2.2.0   \n",
      " ==============================\n",
      " S N O P T  7.7.7    (Feb 2021)\n",
      " ==============================\n",
      "\n",
      " SNMEMB EXIT 100 -- finished successfully\n",
      " SNMEMB INFO 104 -- memory requirements estimated\n",
      "\n",
      " Trial version of SNOPT -- for evaluation or academic purposes only\n",
      "\n",
      "\n",
      "\n",
      " Nonlinear constraints     304     Linear constraints       0\n",
      " Nonlinear variables       254     Linear variables         0\n",
      " Jacobian  variables       254     Objective variables    254\n",
      " Total constraints         304     Total variables        254\n",
      "\n",
      "\n",
      "\n",
      " The user has defined    1304   out of    1304   constraint gradients.\n",
      " The user has defined     254   out of     254   objective  gradients.\n",
      "\n",
      "\n",
      " Major Minors     Step   nCon Feasible  Optimal  MeritFunction     nS Penalty\n",
      "     0     44               1 (4.7E-16) 5.0E-05  1.2031904E+04      1           r\n",
      "     1      1  1.0E+00      2  1.2E-05  6.9E-05  1.2031905E+04                  r\n",
      "     2      0  1.7E-01      4  1.4E-05  3.4E-04  1.2032288E+04                sm l\n",
      "     3      0  1.0E+00      5  3.2E-04 (5.2E-09) 1.2034554E+04\n",
      "     4      0  1.0E+00      6 (6.2E-16)(3.4E-15) 1.2034554E+04        1.8E-03\n",
      "\n",
      " SNOPTC EXIT   0 -- finished successfully\n",
      " SNOPTC INFO   1 -- optimality conditions satisfied\n",
      "\n",
      " Problem name                 solver\n",
      " No. of iterations                  45   Objective            1.2034554047E+04\n",
      " No. of major iterations             4   Linear    obj. term  0.0000000000E+00\n",
      " Penalty parameter           1.843E-03   Nonlinear obj. term  1.2034554047E+04\n",
      " User function calls (total)         7\n",
      " No. of degenerate steps            36   Percentage                      80.00\n",
      " Max x                     202 2.3E+01   Max pi                    150 2.9E+03\n",
      " Max Primal infeas         550 1.4E-14   Max Dual infeas            42 2.5E-13\n",
      " Nonlinear constraint violn    1.4E-14\n",
      "\n",
      "\n",
      "\n",
      " Solution printed on file  10\n",
      "      solver  :   t_proc      (avg)   t_wall      (avg)    n_eval\n",
      "   nlp_jac_f  | 358.00us ( 39.78us) 340.41us ( 37.82us)         9\n",
      "   nlp_jac_g  | 329.14ms ( 36.57ms) 329.04ms ( 36.56ms)         9\n",
      "       total  | 334.51ms (334.51ms) 334.17ms (334.17ms)         1\n",
      "Solve successfully\n",
      "\n",
      " Time for MPS input                             0.00 seconds\n",
      " Time for solving problem                       0.26 seconds\n",
      " Time for solution output                       0.00 seconds\n",
      " Time for constraint functions                  0.30 seconds\n",
      " Time for objective function                    0.00 seconds\n",
      "Setting the init for x\n",
      "Settiing the init for u\n",
      " ==============================\n",
      "    SNOPT  C interface  2.2.0   \n",
      " ==============================\n",
      " S N O P T  7.7.7    (Feb 2021)\n",
      " ==============================\n",
      "\n",
      " SNMEMB EXIT 100 -- finished successfully\n",
      " SNMEMB INFO 104 -- memory requirements estimated\n",
      "\n",
      " Trial version of SNOPT -- for evaluation or academic purposes only\n",
      "\n",
      "\n",
      "\n",
      " Nonlinear constraints     304     Linear constraints       0\n",
      " Nonlinear variables       254     Linear variables         0\n",
      " Jacobian  variables       254     Objective variables    254\n",
      " Total constraints         304     Total variables        254\n",
      "\n",
      "\n",
      "\n",
      " The user has defined    1304   out of    1304   constraint gradients.\n",
      " The user has defined     254   out of     254   objective  gradients.\n",
      "\n",
      "\n",
      " Major Minors     Step   nCon Feasible  Optimal  MeritFunction     nS Penalty\n",
      "     0     46               1 (6.1E-16) 3.3E-05  1.2502481E+04      2           r\n",
      "     1      2  1.0E+00      2  6.4E-06  4.8E-05  1.2502482E+04      1           r\n",
      "     2      1  1.7E-01      4  7.4E-06  6.1E-05  1.2502840E+04                  rl\n",
      "     3      0  1.0E+00      6  3.5E-04 (4.8E-07) 1.2505471E+04                sM\n",
      "     4      0  1.0E+00      7 (6.2E-09)(8.7E-13) 1.2505470E+04        2.2E+01\n",
      "\n",
      " SNOPTC EXIT   0 -- finished successfully\n",
      " SNOPTC INFO   1 -- optimality conditions satisfied\n",
      "\n",
      " Problem name                 solver\n",
      " No. of iterations                  49   Objective            1.2505470199E+04\n",
      " No. of major iterations             4   Linear    obj. term  0.0000000000E+00\n",
      " Penalty parameter           2.237E+01   Nonlinear obj. term  1.2505470199E+04\n",
      " User function calls (total)         8\n",
      " No. of degenerate steps            37   Percentage                      75.51\n",
      " Max x                     202 2.3E+01   Max pi                    146 3.2E+03\n",
      " Max Primal infeas         557 1.4E-07   Max Dual infeas           203 2.8E-09\n",
      " Nonlinear constraint violn    1.4E-07\n",
      "\n",
      "\n",
      "\n",
      " Solution printed on file  10\n",
      "      solver  :   t_proc      (avg)   t_wall      (avg)    n_eval\n",
      "   nlp_jac_f  | 387.00us ( 38.70us) 345.96us ( 34.60us)        10\n",
      "   nlp_jac_g  | 376.45ms ( 37.65ms) 370.12ms ( 37.01ms)        10\n",
      "       total  | 382.04ms (382.04ms) 375.44ms (375.44ms)         1\n",
      "Solve successfully\n",
      "\n",
      " Time for MPS input                             0.00 seconds\n",
      " Time for solving problem                       0.30 seconds\n",
      " Time for solution output                       0.00 seconds\n",
      " Time for constraint functions                  0.33 seconds\n",
      " Time for objective function                    0.00 seconds\n",
      "Setting the init for x\n",
      "Settiing the init for u\n",
      " ==============================\n",
      "    SNOPT  C interface  2.2.0   \n",
      " ==============================\n",
      " S N O P T  7.7.7    (Feb 2021)\n",
      " ==============================\n",
      "\n",
      " SNMEMB EXIT 100 -- finished successfully\n",
      " SNMEMB INFO 104 -- memory requirements estimated\n",
      "\n",
      " Trial version of SNOPT -- for evaluation or academic purposes only\n",
      "\n",
      "\n",
      "\n",
      " Nonlinear constraints     304     Linear constraints       0\n",
      " Nonlinear variables       254     Linear variables         0\n",
      " Jacobian  variables       254     Objective variables    254\n",
      " Total constraints         304     Total variables        254\n",
      "\n",
      "\n",
      "\n",
      " The user has defined    1304   out of    1304   constraint gradients.\n",
      " The user has defined     254   out of     254   objective  gradients.\n",
      "\n",
      "\n",
      " Major Minors     Step   nCon Feasible  Optimal  MeritFunction     nS Penalty\n",
      "     0     46               1 (6.1E-09) 1.2E-05  1.2986327E+04      1           r\n",
      "     1      1  1.0E+00      2  1.5E-06  2.5E-05  1.2986327E+04                  r\n",
      "     2      0  1.7E-01      4  2.5E-06  3.5E-05  1.2986479E+04                  rl\n",
      "     3      0  1.0E+00      5  6.2E-05 (3.9E-10) 1.2987551E+04                sm\n",
      "     4      0  1.0E+00      6 (4.5E-16)(1.7E-15) 1.2987551E+04\n",
      "\n",
      " SNOPTC EXIT   0 -- finished successfully\n",
      " SNOPTC INFO   1 -- optimality conditions satisfied\n",
      "\n",
      " Problem name                 solver\n",
      " No. of iterations                  47   Objective            1.2987550622E+04\n",
      " No. of major iterations             4   Linear    obj. term  0.0000000000E+00\n",
      " Penalty parameter           0.000E+00   Nonlinear obj. term  1.2987550622E+04\n",
      " User function calls (total)         7\n",
      " No. of degenerate steps            35   Percentage                      74.47\n",
      " Max x                     202 2.4E+01   Max pi                    142 3.3E+03\n",
      " Max Primal infeas         466 1.1E-14   Max Dual infeas            38 2.3E-13\n",
      " Nonlinear constraint violn    1.1E-14\n",
      "\n",
      "\n",
      "\n",
      " Solution printed on file  10\n",
      "      solver  :   t_proc      (avg)   t_wall      (avg)    n_eval\n",
      "   nlp_jac_f  | 325.00us ( 36.11us) 315.53us ( 35.06us)         9\n",
      "   nlp_jac_g  | 331.23ms ( 36.80ms) 330.77ms ( 36.75ms)         9\n",
      "       total  | 336.40ms (336.40ms) 335.79ms (335.79ms)         1\n",
      "Solve successfully\n",
      "\n",
      " Time for MPS input                             0.00 seconds\n",
      " Time for solving problem                       0.26 seconds\n",
      " Time for solution output                       0.00 seconds\n",
      " Time for constraint functions                  0.30 seconds\n",
      " Time for objective function                    0.00 seconds\n",
      "Setting the init for x\n",
      "Settiing the init for u\n",
      " ==============================\n",
      "    SNOPT  C interface  2.2.0   \n",
      " ==============================\n",
      " S N O P T  7.7.7    (Feb 2021)\n",
      " ==============================\n",
      "\n",
      " SNMEMB EXIT 100 -- finished successfully\n",
      " SNMEMB INFO 104 -- memory requirements estimated\n",
      "\n",
      " Trial version of SNOPT -- for evaluation or academic purposes only\n",
      "\n",
      "\n",
      "\n",
      " Nonlinear constraints     304     Linear constraints       0\n",
      " Nonlinear variables       254     Linear variables         0\n",
      " Jacobian  variables       254     Objective variables    254\n",
      " Total constraints         304     Total variables        254\n",
      "\n",
      "\n",
      "\n",
      " The user has defined    1304   out of    1304   constraint gradients.\n",
      " The user has defined     254   out of     254   objective  gradients.\n",
      "\n",
      "\n",
      " Major Minors     Step   nCon Feasible  Optimal  MeritFunction     nS Penalty\n",
      "     0     43               1 (4.5E-16)(3.4E-14) 1.3480249E+04                  r\n",
      "\n",
      " SNOPTC EXIT   0 -- finished successfully\n",
      " SNOPTC INFO   1 -- optimality conditions satisfied\n",
      "\n",
      " Problem name                 solver\n",
      " No. of iterations                  43   Objective            1.3480249482E+04\n",
      " No. of major iterations             0   Linear    obj. term  0.0000000000E+00\n",
      " Penalty parameter           0.000E+00   Nonlinear obj. term  1.3480249482E+04\n",
      " User function calls (total)         2\n",
      " No. of degenerate steps            39   Percentage                      90.70\n",
      " Max x                     202 2.4E+01   Max pi                    138 3.4E+03\n",
      " Max Primal infeas         462 1.1E-14   Max Dual infeas             6 1.2E-10\n",
      " Nonlinear constraint violn    1.1E-14\n",
      "\n",
      "\n",
      "\n",
      " Solution printed on file  10\n",
      "      solver  :   t_proc      (avg)   t_wall      (avg)    n_eval\n",
      "   nlp_jac_f  | 149.00us ( 37.25us) 144.81us ( 36.20us)         4\n",
      "   nlp_jac_g  | 148.56ms ( 37.14ms) 148.61ms ( 37.15ms)         4\n",
      "       total  | 152.62ms (152.62ms) 152.53ms (152.53ms)         1\n",
      "Solve successfully\n",
      "\n",
      " Time for MPS input                             0.00 seconds\n",
      " Time for solving problem                       0.08 seconds\n",
      " Time for solution output                       0.00 seconds\n",
      " Time for constraint functions                  0.11 seconds\n",
      " Time for objective function                    0.00 seconds\n",
      "Setting the init for x\n",
      "Settiing the init for u\n",
      " ==============================\n",
      "    SNOPT  C interface  2.2.0   \n",
      " ==============================\n",
      " S N O P T  7.7.7    (Feb 2021)\n",
      " ==============================\n",
      "\n",
      " SNMEMB EXIT 100 -- finished successfully\n",
      " SNMEMB INFO 104 -- memory requirements estimated\n",
      "\n",
      " Trial version of SNOPT -- for evaluation or academic purposes only\n",
      "\n",
      "\n",
      "\n",
      " Nonlinear constraints     304     Linear constraints       0\n",
      " Nonlinear variables       254     Linear variables         0\n",
      " Jacobian  variables       254     Objective variables    254\n",
      " Total constraints         304     Total variables        254\n",
      "\n",
      "\n",
      "\n",
      " The user has defined    1304   out of    1304   constraint gradients.\n",
      " The user has defined     254   out of     254   objective  gradients.\n",
      "\n",
      "\n",
      " Major Minors     Step   nCon Feasible  Optimal  MeritFunction     nS Penalty\n",
      "     0     45               1 (4.4E-16) 1.3E-05  1.3982888E+04      1           r\n",
      "     1      1  1.0E+00      2  1.2E-06  2.5E-05  1.3982888E+04                  r\n",
      "     2      0  1.7E-01      4  1.1E-06  3.4E-05  1.3983051E+04                  rl\n",
      "     3      0  1.0E+00      5  2.7E-05 (1.7E-07) 1.3984177E+04                s\n",
      "     4      0  1.0E+00      6 (2.1E-11)(1.7E-15) 1.3984177E+04\n",
      "\n",
      " SNOPTC EXIT   0 -- finished successfully\n",
      " SNOPTC INFO   1 -- optimality conditions satisfied\n",
      "\n",
      " Problem name                 solver\n",
      " No. of iterations                  46   Objective            1.3984177236E+04\n",
      " No. of major iterations             4   Linear    obj. term  0.0000000000E+00\n",
      " Penalty parameter           0.000E+00   Nonlinear obj. term  1.3984177236E+04\n",
      " User function calls (total)         7\n",
      " No. of degenerate steps            38   Percentage                      82.61\n",
      " Max x                     202 2.4E+01   Max pi                    134 3.6E+03\n",
      " Max Primal infeas         558 5.1E-10   Max Dual infeas            26 3.1E-13\n",
      " Nonlinear constraint violn    5.1E-10\n",
      "\n",
      "\n",
      "\n",
      " Solution printed on file  10\n",
      "      solver  :   t_proc      (avg)   t_wall      (avg)    n_eval\n",
      "   nlp_jac_f  | 340.00us ( 37.78us) 324.91us ( 36.10us)         9\n",
      "   nlp_jac_g  | 327.69ms ( 36.41ms) 327.25ms ( 36.36ms)         9\n",
      "       total  | 332.94ms (332.94ms) 335.08ms (335.08ms)         1\n",
      "Solve successfully\n",
      "\n",
      " Time for MPS input                             0.00 seconds\n",
      " Time for solving problem                       0.25 seconds\n",
      " Time for solution output                       0.00 seconds\n",
      " Time for constraint functions                  0.29 seconds\n",
      " Time for objective function                    0.00 seconds\n",
      "Setting the init for x\n",
      "Settiing the init for u\n",
      " ==============================\n",
      "    SNOPT  C interface  2.2.0   \n",
      " ==============================\n",
      " S N O P T  7.7.7    (Feb 2021)\n",
      " ==============================\n",
      "\n",
      " SNMEMB EXIT 100 -- finished successfully\n",
      " SNMEMB INFO 104 -- memory requirements estimated\n",
      "\n",
      " Trial version of SNOPT -- for evaluation or academic purposes only\n",
      "\n",
      "\n",
      "\n",
      " Nonlinear constraints     304     Linear constraints       0\n",
      " Nonlinear variables       254     Linear variables         0\n",
      " Jacobian  variables       254     Objective variables    254\n",
      " Total constraints         304     Total variables        254\n",
      "\n",
      "\n",
      "\n",
      " The user has defined    1304   out of    1304   constraint gradients.\n",
      " The user has defined     254   out of     254   objective  gradients.\n",
      "\n",
      "\n",
      " Major Minors     Step   nCon Feasible  Optimal  MeritFunction     nS Penalty\n",
      "     0     43               1 (2.1E-11)(1.5E-11) 1.4497685E+04                  r\n",
      "\n",
      " SNOPTC EXIT   0 -- finished successfully\n",
      " SNOPTC INFO   1 -- optimality conditions satisfied\n",
      "\n",
      " Problem name                 solver\n",
      " No. of iterations                  43   Objective            1.4497684950E+04\n",
      " No. of major iterations             0   Linear    obj. term  0.0000000000E+00\n",
      " Penalty parameter           0.000E+00   Nonlinear obj. term  1.4497684950E+04\n",
      " User function calls (total)         2\n",
      " No. of degenerate steps            38   Percentage                      88.37\n",
      " Max x                     202 2.5E+01   Max pi                    130 3.7E+03\n",
      " Max Primal infeas         554 5.1E-10   Max Dual infeas           204 5.5E-08\n",
      " Nonlinear constraint violn    5.1E-10\n",
      "\n",
      "\n",
      "\n",
      " Solution printed on file  10\n",
      "      solver  :   t_proc      (avg)   t_wall      (avg)    n_eval\n",
      "   nlp_jac_f  | 149.00us ( 37.25us) 139.74us ( 34.94us)         4\n",
      "   nlp_jac_g  | 142.91ms ( 35.73ms) 142.67ms ( 35.67ms)         4\n",
      "       total  | 146.79ms (146.79ms) 146.45ms (146.45ms)         1\n",
      "Solve successfully\n",
      "\n",
      " Time for MPS input                             0.00 seconds\n",
      " Time for solving problem                       0.08 seconds\n",
      " Time for solution output                       0.00 seconds\n",
      " Time for constraint functions                  0.11 seconds\n",
      " Time for objective function                    0.00 seconds\n",
      "Setting the init for x\n",
      "Settiing the init for u\n",
      " ==============================\n",
      "    SNOPT  C interface  2.2.0   \n",
      " ==============================\n",
      " S N O P T  7.7.7    (Feb 2021)\n",
      " ==============================\n",
      "\n",
      " SNMEMB EXIT 100 -- finished successfully\n",
      " SNMEMB INFO 104 -- memory requirements estimated\n",
      "\n",
      " Trial version of SNOPT -- for evaluation or academic purposes only\n",
      "\n",
      "\n",
      "\n",
      " Nonlinear constraints     304     Linear constraints       0\n",
      " Nonlinear variables       254     Linear variables         0\n",
      " Jacobian  variables       254     Objective variables    254\n",
      " Total constraints         304     Total variables        254\n",
      "\n",
      "\n",
      "\n",
      " The user has defined    1304   out of    1304   constraint gradients.\n",
      " The user has defined     254   out of     254   objective  gradients.\n",
      "\n",
      "\n",
      " Major Minors     Step   nCon Feasible  Optimal  MeritFunction     nS Penalty\n",
      "     0     43               1 (2.1E-11)(1.5E-11) 1.5021207E+04                  r\n",
      "\n",
      " SNOPTC EXIT   0 -- finished successfully\n",
      " SNOPTC INFO   1 -- optimality conditions satisfied\n",
      "\n",
      " Problem name                 solver\n",
      " No. of iterations                  43   Objective            1.5021207362E+04\n",
      " No. of major iterations             0   Linear    obj. term  0.0000000000E+00\n",
      " Penalty parameter           0.000E+00   Nonlinear obj. term  1.5021207362E+04\n",
      " User function calls (total)         2\n",
      " No. of degenerate steps            38   Percentage                      88.37\n",
      " Max x                     202 2.5E+01   Max pi                    126 3.9E+03\n",
      " Max Primal infeas         550 5.1E-10   Max Dual infeas           204 5.8E-08\n",
      " Nonlinear constraint violn    5.1E-10\n",
      "\n",
      "\n",
      "\n",
      " Solution printed on file  10\n",
      "      solver  :   t_proc      (avg)   t_wall      (avg)    n_eval\n",
      "   nlp_jac_f  | 168.00us ( 42.00us) 130.39us ( 32.60us)         4\n",
      "   nlp_jac_g  | 140.16ms ( 35.04ms) 140.25ms ( 35.06ms)         4\n",
      "       total  | 143.58ms (143.58ms) 143.53ms (143.53ms)         1\n",
      "Solve successfully\n",
      "\n",
      " Time for MPS input                             0.00 seconds\n",
      " Time for solving problem                       0.08 seconds\n",
      " Time for solution output                       0.00 seconds\n",
      " Time for constraint functions                  0.11 seconds\n",
      " Time for objective function                    0.00 seconds\n",
      "Setting the init for x\n",
      "Settiing the init for u\n",
      " ==============================\n",
      "    SNOPT  C interface  2.2.0   \n",
      " ==============================\n",
      " S N O P T  7.7.7    (Feb 2021)\n",
      " ==============================\n",
      "\n",
      " SNMEMB EXIT 100 -- finished successfully\n",
      " SNMEMB INFO 104 -- memory requirements estimated\n",
      "\n",
      " Trial version of SNOPT -- for evaluation or academic purposes only\n",
      "\n",
      "\n",
      "\n",
      " Nonlinear constraints     304     Linear constraints       0\n",
      " Nonlinear variables       254     Linear variables         0\n",
      " Jacobian  variables       254     Objective variables    254\n",
      " Total constraints         304     Total variables        254\n",
      "\n",
      "\n",
      "\n",
      " The user has defined    1304   out of    1304   constraint gradients.\n",
      " The user has defined     254   out of     254   objective  gradients.\n",
      "\n",
      "\n",
      " Major Minors     Step   nCon Feasible  Optimal  MeritFunction     nS Penalty\n",
      "     0     43               1 (2.0E-11)(1.4E-11) 1.5555006E+04                  r\n",
      "\n",
      " SNOPTC EXIT   0 -- finished successfully\n",
      " SNOPTC INFO   1 -- optimality conditions satisfied\n",
      "\n",
      " Problem name                 solver\n",
      " No. of iterations                  43   Objective            1.5555006066E+04\n",
      " No. of major iterations             0   Linear    obj. term  0.0000000000E+00\n",
      " Penalty parameter           0.000E+00   Nonlinear obj. term  1.5555006066E+04\n",
      " User function calls (total)         2\n",
      " No. of degenerate steps            38   Percentage                      88.37\n",
      " Max x                     202 2.5E+01   Max pi                    122 4.1E+03\n",
      " Max Primal infeas         546 5.1E-10   Max Dual infeas           200 5.8E-08\n",
      " Nonlinear constraint violn    5.1E-10\n",
      "\n",
      "\n",
      "\n",
      " Solution printed on file  10\n",
      "      solver  :   t_proc      (avg)   t_wall      (avg)    n_eval\n",
      "   nlp_jac_f  | 153.00us ( 38.25us) 148.22us ( 37.06us)         4\n",
      "   nlp_jac_g  | 141.73ms ( 35.43ms) 142.08ms ( 35.52ms)         4\n",
      "       total  | 145.71ms (145.71ms) 145.94ms (145.94ms)         1\n",
      "Solve successfully\n",
      "\n",
      " Time for MPS input                             0.00 seconds\n",
      " Time for solving problem                       0.07 seconds\n",
      " Time for solution output                       0.00 seconds\n",
      " Time for constraint functions                  0.11 seconds\n",
      " Time for objective function                    0.00 seconds\n",
      "Setting the init for x\n",
      "Settiing the init for u\n",
      " ==============================\n",
      "    SNOPT  C interface  2.2.0   \n",
      " ==============================\n",
      " S N O P T  7.7.7    (Feb 2021)\n",
      " ==============================\n",
      "\n",
      " SNMEMB EXIT 100 -- finished successfully\n",
      " SNMEMB INFO 104 -- memory requirements estimated\n",
      "\n",
      " Trial version of SNOPT -- for evaluation or academic purposes only\n",
      "\n",
      "\n",
      "\n",
      " Nonlinear constraints     304     Linear constraints       0\n",
      " Nonlinear variables       254     Linear variables         0\n",
      " Jacobian  variables       254     Objective variables    254\n",
      " Total constraints         304     Total variables        254\n",
      "\n",
      "\n",
      "\n",
      " The user has defined    1304   out of    1304   constraint gradients.\n",
      " The user has defined     254   out of     254   objective  gradients.\n",
      "\n",
      "\n",
      " Major Minors     Step   nCon Feasible  Optimal  MeritFunction     nS Penalty\n",
      "     0     42               1 (2.0E-11)(1.4E-11) 1.6099528E+04                  r\n",
      "\n",
      " SNOPTC EXIT   0 -- finished successfully\n",
      " SNOPTC INFO   1 -- optimality conditions satisfied\n",
      "\n",
      " Problem name                 solver\n",
      " No. of iterations                  42   Objective            1.6099527850E+04\n",
      " No. of major iterations             0   Linear    obj. term  0.0000000000E+00\n",
      " Penalty parameter           0.000E+00   Nonlinear obj. term  1.6099527850E+04\n",
      " User function calls (total)         2\n",
      " No. of degenerate steps            38   Percentage                      90.48\n",
      " Max x                     202 2.6E+01   Max pi                    118 4.3E+03\n",
      " Max Primal infeas         542 5.1E-10   Max Dual infeas           196 5.8E-08\n",
      " Nonlinear constraint violn    5.1E-10\n",
      "\n",
      "\n",
      "\n",
      " Solution printed on file  10\n",
      "      solver  :   t_proc      (avg)   t_wall      (avg)    n_eval\n",
      "   nlp_jac_f  | 192.00us ( 48.00us) 147.95us ( 36.99us)         4\n",
      "   nlp_jac_g  | 145.83ms ( 36.46ms) 145.83ms ( 36.46ms)         4\n",
      "       total  | 149.91ms (149.91ms) 149.78ms (149.78ms)         1\n",
      "Solve successfully\n",
      "\n",
      " Time for MPS input                             0.00 seconds\n",
      " Time for solving problem                       0.07 seconds\n",
      " Time for solution output                       0.00 seconds\n",
      " Time for constraint functions                  0.11 seconds\n",
      " Time for objective function                    0.00 seconds\n",
      "Setting the init for x\n",
      "Settiing the init for u\n",
      " ==============================\n",
      "    SNOPT  C interface  2.2.0   \n",
      " ==============================\n",
      " S N O P T  7.7.7    (Feb 2021)\n",
      " ==============================\n",
      "\n",
      " SNMEMB EXIT 100 -- finished successfully\n",
      " SNMEMB INFO 104 -- memory requirements estimated\n",
      "\n",
      " Trial version of SNOPT -- for evaluation or academic purposes only\n",
      "\n",
      "\n",
      "\n",
      " Nonlinear constraints     304     Linear constraints       0\n",
      " Nonlinear variables       254     Linear variables         0\n",
      " Jacobian  variables       254     Objective variables    254\n",
      " Total constraints         304     Total variables        254\n",
      "\n",
      "\n",
      "\n",
      " The user has defined    1304   out of    1304   constraint gradients.\n",
      " The user has defined     254   out of     254   objective  gradients.\n",
      "\n",
      "\n",
      " Major Minors     Step   nCon Feasible  Optimal  MeritFunction     nS Penalty\n",
      "     0     42               1 (2.0E-11)(1.3E-11) 1.6655192E+04                  r\n",
      "\n",
      " SNOPTC EXIT   0 -- finished successfully\n",
      " SNOPTC INFO   1 -- optimality conditions satisfied\n",
      "\n",
      " Problem name                 solver\n",
      " No. of iterations                  42   Objective            1.6655192300E+04\n",
      " No. of major iterations             0   Linear    obj. term  0.0000000000E+00\n",
      " Penalty parameter           0.000E+00   Nonlinear obj. term  1.6655192300E+04\n",
      " User function calls (total)         2\n",
      " No. of degenerate steps            37   Percentage                      88.10\n",
      " Max x                     202 2.6E+01   Max pi                    114 4.4E+03\n",
      " Max Primal infeas         538 5.1E-10   Max Dual infeas           192 5.8E-08\n",
      " Nonlinear constraint violn    5.1E-10\n",
      "\n",
      "\n",
      "\n",
      " Solution printed on file  10\n",
      "      solver  :   t_proc      (avg)   t_wall      (avg)    n_eval\n",
      "   nlp_jac_f  | 143.00us ( 35.75us) 135.50us ( 33.87us)         4\n",
      "   nlp_jac_g  | 138.37ms ( 34.59ms) 138.41ms ( 34.60ms)         4\n",
      "       total  | 142.33ms (142.33ms) 142.28ms (142.28ms)         1\n",
      "Solve successfully\n",
      "\n",
      " Time for MPS input                             0.00 seconds\n",
      " Time for solving problem                       0.07 seconds\n",
      " Time for solution output                       0.00 seconds\n",
      " Time for constraint functions                  0.11 seconds\n",
      " Time for objective function                    0.00 seconds\n",
      "Setting the init for x\n",
      "Settiing the init for u\n",
      " ==============================\n",
      "    SNOPT  C interface  2.2.0   \n",
      " ==============================\n",
      " S N O P T  7.7.7    (Feb 2021)\n",
      " ==============================\n",
      "\n",
      " SNMEMB EXIT 100 -- finished successfully\n",
      " SNMEMB INFO 104 -- memory requirements estimated\n",
      "\n",
      " Trial version of SNOPT -- for evaluation or academic purposes only\n",
      "\n",
      "\n",
      "\n",
      " Nonlinear constraints     304     Linear constraints       0\n",
      " Nonlinear variables       254     Linear variables         0\n",
      " Jacobian  variables       254     Objective variables    254\n",
      " Total constraints         304     Total variables        254\n",
      "\n",
      "\n",
      "\n",
      " The user has defined    1304   out of    1304   constraint gradients.\n",
      " The user has defined     254   out of     254   objective  gradients.\n",
      "\n",
      "\n",
      " Major Minors     Step   nCon Feasible  Optimal  MeritFunction     nS Penalty\n",
      "     0     42               1 (2.0E-11)(1.2E-11) 1.7222208E+04                  r\n",
      "\n",
      " SNOPTC EXIT   0 -- finished successfully\n",
      " SNOPTC INFO   1 -- optimality conditions satisfied\n",
      "\n",
      " Problem name                 solver\n",
      " No. of iterations                  42   Objective            1.7222208188E+04\n",
      " No. of major iterations             0   Linear    obj. term  0.0000000000E+00\n",
      " Penalty parameter           0.000E+00   Nonlinear obj. term  1.7222208188E+04\n",
      " User function calls (total)         2\n",
      " No. of degenerate steps            38   Percentage                      90.48\n",
      " Max x                     202 2.6E+01   Max pi                    110 4.6E+03\n",
      " Max Primal infeas         534 5.1E-10   Max Dual infeas           188 5.8E-08\n",
      " Nonlinear constraint violn    5.1E-10\n",
      "\n",
      "\n",
      "\n",
      " Solution printed on file  10\n",
      "      solver  :   t_proc      (avg)   t_wall      (avg)    n_eval\n",
      "   nlp_jac_f  | 150.00us ( 37.50us) 140.39us ( 35.10us)         4\n",
      "   nlp_jac_g  | 146.96ms ( 36.74ms) 146.80ms ( 36.70ms)         4\n",
      "       total  | 150.98ms (150.98ms) 150.67ms (150.67ms)         1\n",
      "Solve successfully\n",
      "\n",
      " Time for MPS input                             0.00 seconds\n",
      " Time for solving problem                       0.07 seconds\n",
      " Time for solution output                       0.00 seconds\n",
      " Time for constraint functions                  0.11 seconds\n",
      " Time for objective function                    0.00 seconds\n",
      "Setting the init for x\n",
      "Settiing the init for u\n",
      " ==============================\n",
      "    SNOPT  C interface  2.2.0   \n",
      " ==============================\n",
      " S N O P T  7.7.7    (Feb 2021)\n",
      " ==============================\n",
      "\n",
      " SNMEMB EXIT 100 -- finished successfully\n",
      " SNMEMB INFO 104 -- memory requirements estimated\n",
      "\n",
      " Trial version of SNOPT -- for evaluation or academic purposes only\n",
      "\n",
      "\n",
      "\n",
      " Nonlinear constraints     304     Linear constraints       0\n",
      " Nonlinear variables       254     Linear variables         0\n",
      " Jacobian  variables       254     Objective variables    254\n",
      " Total constraints         304     Total variables        254\n",
      "\n",
      "\n",
      "\n",
      " The user has defined    1304   out of    1304   constraint gradients.\n",
      " The user has defined     254   out of     254   objective  gradients.\n",
      "\n",
      "\n",
      " Major Minors     Step   nCon Feasible  Optimal  MeritFunction     nS Penalty\n",
      "     0     42               1 (1.9E-11)(1.2E-11) 1.7800671E+04                  r\n",
      "\n",
      " SNOPTC EXIT   0 -- finished successfully\n",
      " SNOPTC INFO   1 -- optimality conditions satisfied\n",
      "\n",
      " Problem name                 solver\n",
      " No. of iterations                  42   Objective            1.7800671325E+04\n",
      " No. of major iterations             0   Linear    obj. term  0.0000000000E+00\n",
      " Penalty parameter           0.000E+00   Nonlinear obj. term  1.7800671325E+04\n",
      " User function calls (total)         2\n",
      " No. of degenerate steps            36   Percentage                      85.71\n",
      " Max x                     202 2.7E+01   Max pi                    106 4.8E+03\n",
      " Max Primal infeas         530 5.1E-10   Max Dual infeas           184 5.8E-08\n",
      " Nonlinear constraint violn    5.1E-10\n",
      "\n",
      "\n",
      "\n",
      " Solution printed on file  10\n",
      "      solver  :   t_proc      (avg)   t_wall      (avg)    n_eval\n",
      "   nlp_jac_f  | 174.00us ( 43.50us) 158.81us ( 39.70us)         4\n",
      "   nlp_jac_g  | 143.68ms ( 35.92ms) 143.53ms ( 35.88ms)         4\n",
      "       total  | 147.47ms (147.47ms) 147.17ms (147.17ms)         1\n",
      "Solve successfully\n",
      "\n",
      " Time for MPS input                             0.00 seconds\n",
      " Time for solving problem                       0.07 seconds\n",
      " Time for solution output                       0.00 seconds\n",
      " Time for constraint functions                  0.11 seconds\n",
      " Time for objective function                    0.00 seconds\n",
      "Setting the init for x\n",
      "Settiing the init for u\n",
      " ==============================\n",
      "    SNOPT  C interface  2.2.0   \n",
      " ==============================\n",
      " S N O P T  7.7.7    (Feb 2021)\n",
      " ==============================\n",
      "\n",
      " SNMEMB EXIT 100 -- finished successfully\n",
      " SNMEMB INFO 104 -- memory requirements estimated\n",
      "\n",
      " Trial version of SNOPT -- for evaluation or academic purposes only\n",
      "\n",
      "\n",
      "\n",
      " Nonlinear constraints     304     Linear constraints       0\n",
      " Nonlinear variables       254     Linear variables         0\n",
      " Jacobian  variables       254     Objective variables    254\n",
      " Total constraints         304     Total variables        254\n",
      "\n",
      "\n",
      "\n",
      " The user has defined    1304   out of    1304   constraint gradients.\n",
      " The user has defined     254   out of     254   objective  gradients.\n",
      "\n",
      "\n",
      " Major Minors     Step   nCon Feasible  Optimal  MeritFunction     nS Penalty\n",
      "     0     42               1 (1.9E-11)(1.1E-11) 1.8390763E+04                  r\n",
      "\n",
      " SNOPTC EXIT   0 -- finished successfully\n",
      " SNOPTC INFO   1 -- optimality conditions satisfied\n",
      "\n",
      " Problem name                 solver\n",
      " No. of iterations                  42   Objective            1.8390762807E+04\n",
      " No. of major iterations             0   Linear    obj. term  0.0000000000E+00\n",
      " Penalty parameter           0.000E+00   Nonlinear obj. term  1.8390762807E+04\n",
      " User function calls (total)         2\n",
      " No. of degenerate steps            37   Percentage                      88.10\n",
      " Max x                     202 2.7E+01   Max pi                      2 5.0E+03\n",
      " Max Primal infeas         526 5.1E-10   Max Dual infeas           180 5.8E-08\n",
      " Nonlinear constraint violn    5.1E-10\n",
      "\n",
      "\n",
      "\n",
      " Solution printed on file  10\n",
      "      solver  :   t_proc      (avg)   t_wall      (avg)    n_eval\n",
      "   nlp_jac_f  | 144.00us ( 36.00us) 138.47us ( 34.62us)         4\n",
      "   nlp_jac_g  | 144.76ms ( 36.19ms) 144.35ms ( 36.09ms)         4\n",
      "       total  | 148.61ms (148.61ms) 148.07ms (148.07ms)         1\n",
      "Solve successfully\n",
      "\n",
      " Time for MPS input                             0.00 seconds\n",
      " Time for solving problem                       0.07 seconds\n",
      " Time for solution output                       0.00 seconds\n",
      " Time for constraint functions                  0.11 seconds\n",
      " Time for objective function                    0.00 seconds\n",
      "Setting the init for x\n",
      "Settiing the init for u\n",
      " ==============================\n",
      "    SNOPT  C interface  2.2.0   \n",
      " ==============================\n",
      " S N O P T  7.7.7    (Feb 2021)\n",
      " ==============================\n",
      "\n",
      " SNMEMB EXIT 100 -- finished successfully\n",
      " SNMEMB INFO 104 -- memory requirements estimated\n",
      "\n",
      " Trial version of SNOPT -- for evaluation or academic purposes only\n",
      "\n",
      "\n",
      "\n",
      " Nonlinear constraints     304     Linear constraints       0\n",
      " Nonlinear variables       254     Linear variables         0\n",
      " Jacobian  variables       254     Objective variables    254\n",
      " Total constraints         304     Total variables        254\n",
      "\n",
      "\n",
      "\n",
      " The user has defined    1304   out of    1304   constraint gradients.\n",
      " The user has defined     254   out of     254   objective  gradients.\n",
      "\n",
      "\n",
      " Major Minors     Step   nCon Feasible  Optimal  MeritFunction     nS Penalty\n",
      "     0     41               1 (1.9E-11)(1.5E-11) 1.8992833E+04                  r\n",
      "\n",
      " SNOPTC EXIT   0 -- finished successfully\n",
      " SNOPTC INFO   1 -- optimality conditions satisfied\n",
      "\n",
      " Problem name                 solver\n",
      " No. of iterations                  41   Objective            1.8992833299E+04\n",
      " No. of major iterations             0   Linear    obj. term  0.0000000000E+00\n",
      " Penalty parameter           0.000E+00   Nonlinear obj. term  1.8992833299E+04\n",
      " User function calls (total)         2\n",
      " No. of degenerate steps            34   Percentage                      82.93\n",
      " Max x                     202 2.7E+01   Max pi                      2 4.0E+03\n",
      " Max Primal infeas         522 5.1E-10   Max Dual infeas           176 5.8E-08\n",
      " Nonlinear constraint violn    5.1E-10\n",
      "\n",
      "\n",
      "\n",
      " Solution printed on file  10\n",
      "      solver \n",
      " Time for MPS input                             0.00 seconds\n",
      " Time for solving problem                       0.08 seconds\n",
      " :   t_proc      (avg)   t_wall      (avg)    n_eval\n",
      "   nlp_jac_f  | 150.00us ( 37.50us) 144.44us ( 36.11us)         4\n",
      "   nlp_jac_g  | 151.60ms ( 37.90ms) 151.40ms ( 37.85ms)         4\n",
      "       total  | 155.58ms (155.58ms) 155.26ms (155.26ms)         1\n",
      "Solve successfully\n",
      " Time for solution output                       0.00 seconds\n",
      " Time for constraint functions                  0.11 seconds\n",
      " Time for objective function                    0.00 seconds\n",
      "Setting the init for x\n",
      "Settiing the init for u\n",
      " ==============================\n",
      "    SNOPT  C interface  2.2.0   \n",
      " ==============================\n",
      " S N O P T  7.7.7    (Feb 2021)\n",
      " ==============================\n",
      "\n",
      " SNMEMB EXIT 100 -- finished successfully\n",
      " SNMEMB INFO 104 -- memory requirements estimated\n",
      "\n",
      " Trial version of SNOPT -- for evaluation or academic purposes only\n",
      "\n",
      "\n",
      "\n",
      " Nonlinear constraints     304     Linear constraints       0\n",
      " Nonlinear variables       254     Linear variables         0\n",
      " Jacobian  variables       254     Objective variables    254\n",
      " Total constraints         304     Total variables        254\n",
      "\n",
      "\n",
      "\n",
      " The user has defined    1304   out of    1304   constraint gradients.\n",
      " The user has defined     254   out of     254   objective  gradients.\n",
      "\n",
      "\n",
      " Major Minors     Step   nCon Feasible  Optimal  MeritFunction     nS Penalty\n",
      "     0     40               1 (1.9E-11)(1.8E-11) 1.9607203E+04                  r\n",
      "\n",
      " SNOPTC EXIT   0 -- finished successfully\n",
      " SNOPTC INFO   1 -- optimality conditions satisfied\n",
      "\n",
      " Problem name                 solver\n",
      " No. of iterations                  40   Objective            1.9607202923E+04\n",
      " No. of major iterations             0   Linear    obj. term  0.0000000000E+00\n",
      " Penalty parameter           0.000E+00   Nonlinear obj. term  1.9607202923E+04\n",
      " User function calls (total)         2\n",
      " No. of degenerate steps            33   Percentage                      82.50\n",
      " Max x                     202 2.8E+01   Max pi                    174 3.1E+03\n",
      " Max Primal infeas         518 5.1E-10   Max Dual infeas           172 5.8E-08\n",
      " Nonlinear constraint violn    5.1E-10\n",
      "\n",
      "\n",
      "\n",
      " Solution printed on file  10\n",
      "      solver  :   t_proc      (avg)   t_wall      (avg)    n_eval\n",
      "   nlp_jac_f  | 146.00us ( 36.50us) 141.42us ( 35.36us)         4\n",
      "   nlp_jac_g  | 149.49ms ( 37.37ms) 149.26ms ( 37.31ms)         4\n",
      "       total  | 153.34ms (153.34ms) 153.02ms (153.02ms)         1\n",
      "Solve successfully\n",
      "\n",
      " Time for MPS input                             0.00 seconds\n",
      " Time for solving problem                       0.08 seconds\n",
      " Time for solution output                       0.00 seconds\n",
      " Time for constraint functions                  0.11 seconds\n",
      " Time for objective function                    0.00 seconds\n",
      "Setting the init for x\n",
      "Settiing the init for u\n",
      " ==============================\n",
      "    SNOPT  C interface  2.2.0   \n",
      " ==============================\n",
      " S N O P T  7.7.7    (Feb 2021)\n",
      " ==============================\n",
      "\n",
      " SNMEMB EXIT 100 -- finished successfully\n",
      " SNMEMB INFO 104 -- memory requirements estimated\n",
      "\n",
      " Trial version of SNOPT -- for evaluation or academic purposes only\n",
      "\n",
      "\n",
      "\n",
      " Nonlinear constraints     304     Linear constraints       0\n",
      " Nonlinear variables       254     Linear variables         0\n",
      " Jacobian  variables       254     Objective variables    254\n",
      " Total constraints         304     Total variables        254\n",
      "\n",
      "\n",
      "\n",
      " The user has defined    1304   out of    1304   constraint gradients.\n",
      " The user has defined     254   out of     254   objective  gradients.\n",
      "\n",
      "\n",
      " Major Minors     Step   nCon Feasible  Optimal  MeritFunction     nS Penalty\n",
      "     0     42               1 (1.8E-11) 1.1E-05  2.0233974E+04      2           r\n",
      "     1      2  1.0E+00      2 (9.9E-07) 2.0E-05  2.0233974E+04                  r\n",
      "     2      0  1.7E-01      4  1.3E-05  2.9E-05  2.0234243E+04                  rl\n",
      "     3      0  1.0E+00      5  3.0E-04  1.3E-04  2.0236244E+04                sm\n",
      "     4      0  1.0E+00      6 (3.8E-09)(3.4E-14) 2.0236245E+04\n",
      "\n",
      " SNOPTC EXIT   0 -- finished successfully\n",
      " SNOPTC INFO   1 -- optimality conditions satisfied\n",
      "\n",
      " Problem name                 solver\n",
      " No. of iterations                  44   Objective            2.0236244902E+04\n",
      " No. of major iterations             4   Linear    obj. term  0.0000000000E+00\n",
      " Penalty parameter           0.000E+00   Nonlinear obj. term  2.0236244902E+04\n",
      " User function calls (total)         7\n",
      " No. of degenerate steps            33   Percentage                      75.00\n",
      " Max x                     202 2.8E+01   Max pi                    170 3.3E+03\n",
      " Max Primal infeas         558 1.1E-07   Max Dual infeas           204 1.1E-10\n",
      " Nonlinear constraint violn    1.1E-07\n",
      "\n",
      "\n",
      "\n",
      " Solution printed on file  10\n",
      "      solver  :   t_proc      (avg)   t_wall      (avg)    n_eval\n",
      "   nlp_jac_f  | 344.00us ( 38.22us) 334.63us ( 37.18us)         9\n",
      "   nlp_jac_g  | 340.40ms ( 37.82ms) 330.51ms ( 36.72ms)         9\n",
      "       total  | 345.51ms (345.51ms) 335.43ms (335.43ms)         1\n",
      "Solve successfully\n",
      "\n",
      " Time for MPS input                             0.00 seconds\n",
      " Time for solving problem                       0.26 seconds\n",
      " Time for solution output                       0.00 seconds\n",
      " Time for constraint functions                  0.30 seconds\n",
      " Time for objective function                    0.00 seconds\n",
      "Setting the init for x\n",
      "Settiing the init for u\n",
      " ==============================\n",
      "    SNOPT  C interface  2.2.0   \n",
      " ==============================\n",
      " S N O P T  7.7.7    (Feb 2021)\n",
      " ==============================\n",
      "\n",
      " SNMEMB EXIT 100 -- finished successfully\n",
      " SNMEMB INFO 104 -- memory requirements estimated\n",
      "\n",
      " Trial version of SNOPT -- for evaluation or academic purposes only\n",
      "\n",
      "\n",
      "\n",
      " Nonlinear constraints     304     Linear constraints       0\n",
      " Nonlinear variables       254     Linear variables         0\n",
      " Jacobian  variables       254     Objective variables    254\n",
      " Total constraints         304     Total variables        254\n",
      "\n",
      "\n",
      "\n",
      " The user has defined    1304   out of    1304   constraint gradients.\n",
      " The user has defined     254   out of     254   objective  gradients.\n",
      "\n",
      "\n",
      " Major Minors     Step   nCon Feasible  Optimal  MeritFunction     nS Penalty\n",
      "     0     43               1 (3.7E-09) 3.2E-05  2.0878401E+04      1           r\n",
      "     1      1  1.0E+00      2  5.2E-06  4.8E-05  2.0878402E+04                  r\n",
      "     2      0  1.7E-01      4  4.4E-06  6.0E-05  2.0878711E+04                  rl\n",
      "     3      0  1.0E+00      5  1.0E-04 (7.9E-09) 2.0880584E+04                s\n",
      "     4      0  1.0E+00      6 (3.1E-16)(3.5E-15) 2.0880584E+04        2.0E+01\n",
      "\n",
      " SNOPTC EXIT   0 -- finished successfully\n",
      " SNOPTC INFO   1 -- optimality conditions satisfied\n",
      "\n",
      " Problem name                 solver\n",
      " No. of iterations                  44   Objective            2.0880584341E+04\n",
      " No. of major iterations             4   Linear    obj. term  0.0000000000E+00\n",
      " Penalty parameter           2.048E+01   Nonlinear obj. term  2.0880584341E+04\n",
      " User function calls (total)         7\n",
      " No. of degenerate steps            35   Percentage                      79.55\n",
      " Max x                     202 2.8E+01   Max pi                    166 3.6E+03\n",
      " Max Primal infeas         510 8.9E-15   Max Dual infeas            66 3.9E-13\n",
      " Nonlinear constraint violn    8.9E-15\n",
      "\n",
      "\n",
      "\n",
      " Solution printed on file  10\n",
      "      solver  :   t_proc      (avg)   t_wall      (avg)    n_eval\n",
      "   nlp_jac_f  | 356.00us ( 39.56us) 321.54us ( 35.73us)         9\n",
      "   nlp_jac_g  | 331.77ms ( 36.86ms) 331.32ms ( 36.81ms)         9\n",
      "       total  | 336.86ms (336.86ms) 336.18ms (336.18ms)         1\n",
      "Solve successfully\n",
      "\n",
      " Time for MPS input                             0.00 seconds\n",
      " Time for solving problem                       0.26 seconds\n",
      " Time for solution output                       0.00 seconds\n",
      " Time for constraint functions                  0.30 seconds\n",
      " Time for objective function                    0.00 seconds\n",
      "Setting the init for x\n",
      "Settiing the init for u\n",
      " ==============================\n",
      "    SNOPT  C interface  2.2.0   \n",
      " ==============================\n",
      " S N O P T  7.7.7    (Feb 2021)\n",
      " ==============================\n",
      "\n",
      " SNMEMB EXIT 100 -- finished successfully\n",
      " SNMEMB INFO 104 -- memory requirements estimated\n",
      "\n",
      " Trial version of SNOPT -- for evaluation or academic purposes only\n",
      "\n",
      "\n",
      "\n",
      " Nonlinear constraints     304     Linear constraints       0\n",
      " Nonlinear variables       254     Linear variables         0\n",
      " Jacobian  variables       254     Objective variables    254\n",
      " Total constraints         304     Total variables        254\n",
      "\n",
      "\n",
      "\n",
      " The user has defined    1304   out of    1304   constraint gradients.\n",
      " The user has defined     254   out of     254   objective  gradients.\n",
      "\n",
      "\n",
      " Major Minors     Step   nCon Feasible  Optimal  MeritFunction     nS Penalty\n",
      "     0     43               1 (3.1E-16) 4.7E-05  2.1538699E+04      1           r\n",
      "     1      1  1.0E+00      2  1.1E-05  6.3E-05  2.1538700E+04                  r\n",
      "     2      0  1.7E-01      4  1.6E-05  2.0E-03  2.1539151E+04                sm l\n",
      "     3      0  1.0E+00      5  4.2E-04 (7.6E-09) 2.1541751E+04\n",
      "     4      0  1.0E+00      6 (5.6E-16)(1.9E-15) 2.1541751E+04        2.0E-03\n",
      "\n",
      " SNOPTC EXIT   0 -- finished successfully\n",
      " SNOPTC INFO   1 -- optimality conditions satisfied\n",
      "\n",
      " Problem name                 solver\n",
      " No. of iterations                  44   Objective            2.1541751389E+04\n",
      " No. of major iterations             4   Linear    obj. term  0.0000000000E+00\n",
      " Penalty parameter           2.014E-03   Nonlinear obj. term  2.1541751389E+04\n",
      " User function calls (total)         7\n",
      " No. of degenerate steps            36   Percentage                      81.82\n",
      " Max x                     202 2.9E+01   Max pi                    162 3.8E+03\n",
      " Max Primal infeas         502 1.6E-14   Max Dual infeas            18 2.6E-13\n",
      " Nonlinear constraint violn    1.6E-14\n",
      "\n",
      "\n",
      "\n",
      " Solution printed on file  10\n",
      "      solver  :   t_proc      (avg)   t_wall      (avg)    n_eval\n",
      "   nlp_jac_f  | 429.00us ( 47.67us) 338.29us ( 37.59us)         9\n",
      "   nlp_jac_g  | 329.67ms ( 36.63ms) 329.27ms ( 36.59ms)         9\n",
      "       total  | 334.98ms (334.98ms) 334.29ms (334.29ms)         1\n",
      "Solve successfully\n",
      "\n",
      " Time for MPS input                             0.00 seconds\n",
      " Time for solving problem                       0.26 seconds\n",
      " Time for solution output                       0.00 seconds\n",
      " Time for constraint functions                  0.29 seconds\n",
      " Time for objective function                    0.00 seconds\n",
      "Setting the init for x\n",
      "Settiing the init for u\n",
      " ==============================\n",
      "    SNOPT  C interface  2.2.0   \n",
      " ==============================\n",
      " S N O P T  7.7.7    (Feb 2021)\n",
      " ==============================\n",
      "\n",
      " SNMEMB EXIT 100 -- finished successfully\n",
      " SNMEMB INFO 104 -- memory requirements estimated\n",
      "\n",
      " Trial version of SNOPT -- for evaluation or academic purposes only\n",
      "\n",
      "\n",
      "\n",
      " Nonlinear constraints     304     Linear constraints       0\n",
      " Nonlinear variables       254     Linear variables         0\n",
      " Jacobian  variables       254     Objective variables    254\n",
      " Total constraints         304     Total variables        254\n",
      "\n",
      "\n",
      "\n",
      " The user has defined    1304   out of    1304   constraint gradients.\n",
      " The user has defined     254   out of     254   objective  gradients.\n",
      "\n",
      "\n",
      " Major Minors     Step   nCon Feasible  Optimal  MeritFunction     nS Penalty\n",
      "     0     44               1 (5.5E-16) 5.0E-05  2.2216092E+04      1           r\n",
      "     1      1  1.0E+00      2  1.3E-05  6.5E-05  2.2216093E+04                  r\n",
      "     2      0  1.7E-01      4  1.5E-05  1.6E-04  2.2216591E+04                sm l\n",
      "     3      0  1.0E+00      5  3.6E-04 (6.8E-09) 2.2219433E+04\n",
      "     4      0  1.0E+00      6 (6.1E-16)(4.1E-15) 2.2219433E+04        2.3E-03\n",
      "\n",
      " SNOPTC EXIT   0 -- finished successfully\n",
      " SNOPTC INFO   1 -- optimality conditions satisfied\n",
      "\n",
      " Problem name                 solver\n",
      " No. of iterations                  45   Objective            2.2219432684E+04\n",
      " No. of major iterations             4   Linear    obj. term  0.0000000000E+00\n",
      " Penalty parameter           2.319E-03   Nonlinear obj. term  2.2219432684E+04\n",
      " User function calls (total)         7\n",
      " No. of degenerate steps            37   Percentage                      82.22\n",
      " Max x                     202 2.9E+01   Max pi                    158 4.0E+03\n",
      " Max Primal infeas         550 1.8E-14   Max Dual infeas            58 2.8E-13\n",
      " Nonlinear constraint violn    1.8E-14\n",
      "\n",
      "\n",
      "\n",
      " Solution printed on file  10\n",
      "      solver  :   t_proc      (avg)   t_wall      (avg)    n_eval\n",
      "   nlp_jac_f  | 351.00us ( 39.00us) 309.26us ( 34.36us)         9\n",
      "   nlp_jac_g  | 320.20ms ( 35.58ms) 319.98ms ( 35.55ms)         9\n",
      "       total  | 325.34ms (325.34ms) 324.90ms (324.90ms)         1\n",
      "Solve successfully\n",
      "\n",
      " Time for MPS input                             0.00 seconds\n",
      " Time for solving problem                       0.25 seconds\n",
      " Time for solution output                       0.00 seconds\n",
      " Time for constraint functions                  0.28 seconds\n",
      " Time for objective function                    0.00 seconds\n",
      "Setting the init for x\n",
      "Settiing the init for u\n",
      " ==============================\n",
      "    SNOPT  C interface  2.2.0   \n",
      " ==============================\n",
      " S N O P T  7.7.7    (Feb 2021)\n",
      " ==============================\n",
      "\n",
      " SNMEMB EXIT 100 -- finished successfully\n",
      " SNMEMB INFO 104 -- memory requirements estimated\n",
      "\n",
      " Trial version of SNOPT -- for evaluation or academic purposes only\n",
      "\n",
      "\n",
      "\n",
      " Nonlinear constraints     304     Linear constraints       0\n",
      " Nonlinear variables       254     Linear variables         0\n",
      " Jacobian  variables       254     Objective variables    254\n",
      " Total constraints         304     Total variables        254\n",
      "\n",
      "\n",
      "\n",
      " The user has defined    1304   out of    1304   constraint gradients.\n",
      " The user has defined     254   out of     254   objective  gradients.\n",
      "\n",
      "\n",
      " Major Minors     Step   nCon Feasible  Optimal  MeritFunction     nS Penalty\n",
      "     0     45               1 (6.0E-16) 3.8E-05  2.2909208E+04      1           r\n",
      "     1      1  1.0E+00      2  8.5E-06  5.3E-05  2.2909208E+04                  r\n",
      "     2      0  1.7E-01      4  7.2E-06  6.5E-05  2.2909617E+04                  rl\n",
      "     3      0  1.0E+00      5  1.8E-04 (2.1E-08) 2.2911997E+04                s\n",
      "     4      0  1.0E+00      6 (7.2E-16)(3.5E-15) 2.2911997E+04        1.0E+01\n",
      "\n",
      " SNOPTC EXIT   0 -- finished successfully\n",
      " SNOPTC INFO   1 -- optimality conditions satisfied\n",
      "\n",
      " Problem name                 solver\n",
      " No. of iterations                  46   Objective            2.2911996896E+04\n",
      " No. of major iterations             4   Linear    obj. term  0.0000000000E+00\n",
      " Penalty parameter           9.980E+00   Nonlinear obj. term  2.2911996896E+04\n",
      " User function calls (total)         7\n",
      " No. of degenerate steps            37   Percentage                      80.43\n",
      " Max x                     202 2.9E+01   Max pi                    154 4.2E+03\n",
      " Max Primal infeas         462 2.1E-14   Max Dual infeas            58 4.2E-13\n",
      " Nonlinear constraint violn    2.1E-14\n",
      "\n",
      "\n",
      "\n",
      " Solution printed on file  10\n",
      "      solver  :   t_proc      (avg)   t_wall      (avg)    n_eval\n",
      "   nlp_jac_f  | 354.00us ( 39.33us) 324.14us ( 36.02us)         9\n",
      "   nlp_jac_g  | 321.55ms ( 35.73ms) 321.16ms ( 35.68ms)         9\n",
      "       total  | 326.64ms (326.64ms) 326.09ms (326.09ms)         1\n",
      "Solve successfully\n",
      "\n",
      " Time for MPS input                             0.00 seconds\n",
      " Time for solving problem                       0.25 seconds\n",
      " Time for solution output                       0.00 seconds\n",
      " Time for constraint functions                  0.29 seconds\n",
      " Time for objective function                    0.00 seconds\n",
      "Setting the init for x\n",
      "Settiing the init for u\n",
      " ==============================\n",
      "    SNOPT  C interface  2.2.0   \n",
      " ==============================\n",
      " S N O P T  7.7.7    (Feb 2021)\n",
      " ==============================\n",
      "\n",
      " SNMEMB EXIT 100 -- finished successfully\n",
      " SNMEMB INFO 104 -- memory requirements estimated\n",
      "\n",
      " Trial version of SNOPT -- for evaluation or academic purposes only\n",
      "\n",
      "\n",
      "\n",
      " Nonlinear constraints     304     Linear constraints       0\n",
      " Nonlinear variables       254     Linear variables         0\n",
      " Jacobian  variables       254     Objective variables    254\n",
      " Total constraints         304     Total variables        254\n",
      "\n",
      "\n",
      "\n",
      " The user has defined    1304   out of    1304   constraint gradients.\n",
      " The user has defined     254   out of     254   objective  gradients.\n",
      "\n",
      "\n",
      " Major Minors     Step   nCon Feasible  Optimal  MeritFunction     nS Penalty\n",
      "     0     47               1 (7.2E-16) 2.0E-05  2.3615923E+04      1           r\n",
      "     1      1  1.0E+00      2  3.1E-06  3.2E-05  2.3615923E+04                  r\n",
      "     2      0  1.7E-01      4  3.0E-06  4.0E-05  2.3616173E+04                  rl\n",
      "     3      0  1.0E+00      5  7.5E-05 (3.6E-09) 2.3617742E+04                s\n",
      "     4      0  1.0E+00      6 (4.9E-15)(3.6E-15) 2.3617742E+04\n",
      "\n",
      " SNOPTC EXIT   0 -- finished successfully\n",
      " SNOPTC INFO   1 -- optimality conditions satisfied\n",
      "\n",
      " Problem name                 solver\n",
      " No. of iterations                  48   Objective            2.3617742313E+04\n",
      " No. of major iterations             4   Linear    obj. term  0.0000000000E+00\n",
      " Penalty parameter           0.000E+00   Nonlinear obj. term  2.3617742313E+04\n",
      " User function calls (total)         7\n",
      " No. of degenerate steps            39   Percentage                      81.25\n",
      " Max x                     202 3.0E+01   Max pi                    150 4.4E+03\n",
      " Max Primal infeas         377 1.4E-13   Max Dual infeas            50 5.1E-13\n",
      " Nonlinear constraint violn    1.4E-13\n",
      "\n",
      "\n",
      "\n",
      " Solution printed on file  10\n",
      "      solver  :   t_proc      (avg)   t_wall      (avg)    n_eval\n",
      "   nlp_jac_f  | 371.00us ( 41.22us) 330.70us ( 36.74us)         9\n",
      "   nlp_jac_g  | 335.80ms ( 37.31ms) 332.61ms ( 36.96ms)         9\n",
      "       total  | 341.04ms (341.04ms) 337.67ms (337.67ms)         1\n",
      "Solve successfully\n",
      "\n",
      " Time for MPS input                             0.00 seconds\n",
      " Time for solving problem                       0.26 seconds\n",
      " Time for solution output                       0.00 seconds\n",
      " Time for constraint functions                  0.30 seconds\n",
      " Time for objective function                    0.00 seconds\n",
      "Setting the init for x\n",
      "Settiing the init for u\n",
      " ==============================\n",
      "    SNOPT  C interface  2.2.0   \n",
      " ==============================\n",
      " S N O P T  7.7.7    (Feb 2021)\n",
      " ==============================\n",
      "\n",
      " SNMEMB EXIT 100 -- finished successfully\n",
      " SNMEMB INFO 104 -- memory requirements estimated\n",
      "\n",
      " Trial version of SNOPT -- for evaluation or academic purposes only\n",
      "\n",
      "\n",
      "\n",
      " Nonlinear constraints     304     Linear constraints       0\n",
      " Nonlinear variables       254     Linear variables         0\n",
      " Jacobian  variables       254     Objective variables    254\n",
      " Total constraints         304     Total variables        254\n",
      "\n",
      "\n",
      "\n",
      " The user has defined    1304   out of    1304   constraint gradients.\n",
      " The user has defined     254   out of     254   objective  gradients.\n",
      "\n",
      "\n",
      " Major Minors     Step   nCon Feasible  Optimal  MeritFunction     nS Penalty\n",
      "     0     48               1 (4.8E-15)(1.8E-06) 2.4334550E+04      1           r\n",
      "\n",
      " SNOPTC EXIT   0 -- finished successfully\n",
      " SNOPTC INFO   1 -- optimality conditions satisfied\n",
      "\n",
      " Problem name                 solver\n",
      " No. of iterations                  48   Objective            2.4334550045E+04\n",
      " No. of major iterations             0   Linear    obj. term  0.0000000000E+00\n",
      " Penalty parameter           0.000E+00   Nonlinear obj. term  2.4334550045E+04\n",
      " User function calls (total)         2\n",
      " No. of superbasics                  1   No. of basic nonlinears           254\n",
      " No. of degenerate steps            41   Percentage                      85.42\n",
      " Max x                     202 3.0E+01   Max pi                    146 4.6E+03\n",
      " Max Primal infeas         373 1.4E-13   Max Dual infeas           253 8.5E-03\n",
      " Nonlinear constraint violn    1.4E-13\n",
      "\n",
      "\n",
      "\n",
      " Solution printed on file  10\n",
      "      solver  :   t_proc      (avg)   t_wall      (avg)    n_eval\n",
      "   nlp_jac_f  | 141.00us ( 35.25us) 137.87us ( 34.47us)         4\n",
      "   nlp_jac_g  | 145.75ms ( 36.44ms) 145.57ms ( 36.39ms)         4\n",
      "       total  | 149.76ms (149.76ms) 149.46ms (149.46ms)         1\n",
      "Solve successfully\n",
      "\n",
      " Time for MPS input                             0.00 seconds\n",
      " Time for solving problem                       0.07 seconds\n",
      " Time for solution output                       0.00 seconds\n",
      " Time for constraint functions                  0.11 seconds\n",
      " Time for objective function                    0.00 seconds\n",
      "Setting the init for x\n",
      "Settiing the init for u\n",
      " ==============================\n",
      "    SNOPT  C interface  2.2.0   \n",
      " ==============================\n",
      " S N O P T  7.7.7    (Feb 2021)\n",
      " ==============================\n",
      "\n",
      " SNMEMB EXIT 100 -- finished successfully\n",
      " SNMEMB INFO 104 -- memory requirements estimated\n",
      "\n",
      " Trial version of SNOPT -- for evaluation or academic purposes only\n",
      "\n",
      "\n",
      "\n",
      " Nonlinear constraints     304     Linear constraints       0\n",
      " Nonlinear variables       254     Linear variables         0\n",
      " Jacobian  variables       254     Objective variables    254\n",
      " Total constraints         304     Total variables        254\n",
      "\n",
      "\n",
      "\n",
      " The user has defined    1304   out of    1304   constraint gradients.\n",
      " The user has defined     254   out of     254   objective  gradients.\n",
      "\n",
      "\n",
      " Major Minors     Step   nCon Feasible  Optimal  MeritFunction     nS Penalty\n",
      "     0     48               1 (4.8E-15) 2.8E-05  2.5061616E+04      1           r\n",
      "     1      1  1.0E+00      2  2.9E-06  4.2E-05  2.5061617E+04                  r\n",
      "     2      0  1.7E-01      4  2.4E-06  5.1E-05  2.5061962E+04                  rl\n",
      "     3      0  1.0E+00      5  4.7E-05 (1.9E-07) 2.5064008E+04                s\n",
      "     4      0  1.0E+00      6 (6.6E-11)(6.8E-15) 2.5064008E+04\n",
      "\n",
      " SNOPTC EXIT   0 -- finished successfully\n",
      " SNOPTC INFO   1 -- optimality conditions satisfied\n",
      "\n",
      " Problem name                 solver\n",
      " No. of iterations                  49   Objective            2.5064007869E+04\n",
      " No. of major iterations             4   Linear    obj. term  0.0000000000E+00\n",
      " Penalty parameter           0.000E+00   Nonlinear obj. term  2.5064007869E+04\n",
      " User function calls (total)         7\n",
      " No. of degenerate steps            41   Percentage                      83.67\n",
      " Max x                     202 3.0E+01   Max pi                    142 4.8E+03\n",
      " Max Primal infeas         558 2.0E-09   Max Dual infeas           204 3.2E-11\n",
      " Nonlinear constraint violn    2.0E-09\n",
      "\n",
      "\n",
      "\n",
      " Solution printed on file  10\n",
      "      solver  :   t_proc      (avg)   t_wall      (avg)    n_eval\n",
      "   nlp_jac_f  | 401.00us ( 44.56us) 325.73us ( 36.19us)         9\n",
      "   nlp_jac_g  | 331.21ms ( 36.80ms) 330.77ms ( 36.75ms)         9\n",
      "       total  | 336.62ms (336.62ms) 335.92ms (335.92ms)         1\n",
      "Solve successfully\n",
      "\n",
      " Time for MPS input                             0.00 seconds\n",
      " Time for solving problem                       0.26 seconds\n",
      " Time for solution output                       0.00 seconds\n",
      " Time for constraint functions                  0.29 seconds\n",
      " Time for objective function                    0.00 seconds\n",
      "Setting the init for x\n",
      "Settiing the init for u\n",
      " ==============================\n",
      "    SNOPT  C interface  2.2.0   \n",
      " ==============================\n",
      " S N O P T  7.7.7    (Feb 2021)\n",
      " ==============================\n",
      "\n",
      " SNMEMB EXIT 100 -- finished successfully\n",
      " SNMEMB INFO 104 -- memory requirements estimated\n",
      "\n",
      " Trial version of SNOPT -- for evaluation or academic purposes only\n",
      "\n",
      "\n",
      "\n",
      " Nonlinear constraints     304     Linear constraints       0\n",
      " Nonlinear variables       254     Linear variables         0\n",
      " Jacobian  variables       254     Objective variables    254\n",
      " Total constraints         304     Total variables        254\n",
      "\n",
      "\n",
      "\n",
      " The user has defined    1304   out of    1304   constraint gradients.\n",
      " The user has defined     254   out of     254   objective  gradients.\n",
      "\n",
      "\n",
      " Major Minors     Step   nCon Feasible  Optimal  MeritFunction     nS Penalty\n",
      "     0     46               1 (6.5E-11)(4.3E-11) 2.5803534E+04                  r\n",
      "\n",
      " SNOPTC EXIT   0 -- finished successfully\n",
      " SNOPTC INFO   1 -- optimality conditions satisfied\n",
      "\n",
      " Problem name                 solver\n",
      " No. of iterations                  46   Objective            2.5803533916E+04\n",
      " No. of major iterations             0   Linear    obj. term  0.0000000000E+00\n",
      " Penalty parameter           0.000E+00   Nonlinear obj. term  2.5803533916E+04\n",
      " User function calls (total)         2\n",
      " No. of degenerate steps            39   Percentage                      84.78\n",
      " Max x                     202 3.1E+01   Max pi                    138 5.0E+03\n",
      " Max Primal infeas         554 2.0E-09   Max Dual infeas           204 2.1E-07\n",
      " Nonlinear constraint violn    2.0E-09\n",
      "\n",
      "\n",
      "\n",
      " Solution printed on file  10\n",
      "      solver  :   t_proc      (avg)   t_wall      (avg)    n_eval\n",
      "   nlp_jac_f  | 146.00us ( 36.50us) 139.61us ( 34.90us)         4\n",
      "   nlp_jac_g  | 156.13ms ( 39.03ms) 148.26ms ( 37.06ms)         4\n",
      "       total  | 160.20ms (160.20ms) 152.19ms (152.19ms)         1\n",
      "Solve successfully\n",
      "\n",
      " Time for MPS input                             0.00 seconds\n",
      " Time for solving problem                       0.08 seconds\n",
      " Time for solution output                       0.00 seconds\n",
      " Time for constraint functions                  0.11 seconds\n",
      " Time for objective function                    0.00 seconds\n",
      "Setting the init for x\n",
      "Settiing the init for u\n",
      " ==============================\n",
      "    SNOPT  C interface  2.2.0   \n",
      " ==============================\n",
      " S N O P T  7.7.7    (Feb 2021)\n",
      " ==============================\n",
      "\n",
      " SNMEMB EXIT 100 -- finished successfully\n",
      " SNMEMB INFO 104 -- memory requirements estimated\n",
      "\n",
      " Trial version of SNOPT -- for evaluation or academic purposes only\n",
      "\n",
      "\n",
      "\n",
      " Nonlinear constraints     304     Linear constraints       0\n",
      " Nonlinear variables       254     Linear variables         0\n",
      " Jacobian  variables       254     Objective variables    254\n",
      " Total constraints         304     Total variables        254\n",
      "\n",
      "\n",
      "\n",
      " The user has defined    1304   out of    1304   constraint gradients.\n",
      " The user has defined     254   out of     254   objective  gradients.\n",
      "\n",
      "\n",
      " Major Minors     Step   nCon Feasible  Optimal  MeritFunction     nS Penalty\n",
      "     0     46               1 (6.4E-11)(4.4E-11) 2.6554412E+04                  r\n",
      "\n",
      " SNOPTC EXIT   0 -- finished successfully\n",
      " SNOPTC INFO   1 -- optimality conditions satisfied\n",
      "\n",
      " Problem name                 solver\n",
      " No. of iterations                  46   Objective            2.6554411740E+04\n",
      " No. of major iterations             0   Linear    obj. term  0.0000000000E+00\n",
      " Penalty parameter           0.000E+00   Nonlinear obj. term  2.6554411740E+04\n",
      " User function calls (total)         2\n",
      " No. of degenerate steps            39   Percentage                      84.78\n",
      " Max x                     202 3.1E+01   Max pi                    134 5.2E+03\n",
      " Max Primal infeas         550 2.0E-09   Max Dual infeas           204 2.3E-07\n",
      " Nonlinear constraint violn    2.0E-09\n",
      "\n",
      "\n",
      "\n",
      " Solution printed on file  10\n",
      "      solver  :   t_proc      (avg)   t_wall      (avg)    n_eval\n",
      "   nlp_jac_f  | 158.00us ( 39.50us) 148.96us ( 37.24us)         4\n",
      "   nlp_jac_g  | 145.08ms ( 36.27ms) 144.87ms ( 36.22ms)         4\n",
      "       total  | 149.38ms (149.38ms) 157.78ms (157.78ms)         1\n",
      "Solve successfully\n",
      "\n",
      " Time for MPS input                             0.00 seconds\n",
      " Time for solving problem                       0.07 seconds\n",
      " Time for solution output                       0.01 seconds\n",
      " Time for constraint functions                  0.11 seconds\n",
      " Time for objective function                    0.00 seconds\n",
      "Setting the init for x\n",
      "Settiing the init for u\n",
      " ==============================\n",
      "    SNOPT  C interface  2.2.0   \n",
      " ==============================\n",
      " S N O P T  7.7.7    (Feb 2021)\n",
      " ==============================\n",
      "\n",
      " SNMEMB EXIT 100 -- finished successfully\n",
      " SNMEMB INFO 104 -- memory requirements estimated\n",
      "\n",
      " Trial version of SNOPT -- for evaluation or academic purposes only\n",
      "\n",
      "\n",
      "\n",
      " Nonlinear constraints     304     Linear constraints       0\n",
      " Nonlinear variables       254     Linear variables         0\n",
      " Jacobian  variables       254     Objective variables    254\n",
      " Total constraints         304     Total variables        254\n",
      "\n",
      "\n",
      "\n",
      " The user has defined    1304   out of    1304   constraint gradients.\n",
      " The user has defined     254   out of     254   objective  gradients.\n",
      "\n",
      "\n",
      " Major Minors     Step   nCon Feasible  Optimal  MeritFunction     nS Penalty\n",
      "     0     45               1 (6.4E-11)(4.2E-11) 2.7317472E+04                  r\n",
      "\n",
      " SNOPTC EXIT   0 -- finished successfully\n",
      " SNOPTC INFO   1 -- optimality conditions satisfied\n",
      "\n",
      " Problem name                 solver\n",
      " No. of iterations                  45   Objective            2.7317471616E+04\n",
      " No. of major iterations             0   Linear    obj. term  0.0000000000E+00\n",
      " Penalty parameter           0.000E+00   Nonlinear obj. term  2.7317471616E+04\n",
      " User function calls (total)         2\n",
      " No. of degenerate steps            39   Percentage                      86.67\n",
      " Max x                     202 3.1E+01   Max pi                    130 5.4E+03\n",
      " Max Primal infeas         546 2.0E-09   Max Dual infeas           200 2.3E-07\n",
      " Nonlinear constraint violn    2.0E-09\n",
      "\n",
      "\n",
      "\n",
      " Solution printed on file  10\n",
      "      solver  :   t_proc      (avg)   t_wall      (avg)    n_eval\n",
      "   nlp_jac_f  | 176.00us ( 44.00us) 134.33us ( 33.58us)         4\n",
      "   nlp_jac_g  | 146.43ms ( 36.61ms) 146.15ms ( 36.54ms)         4\n",
      "       total  | 150.42ms (150.42ms) 150.03ms (150.03ms)         1\n",
      "Solve successfully\n",
      "\n",
      " Time for MPS input                             0.00 seconds\n",
      " Time for solving problem                       0.07 seconds\n",
      " Time for solution output                       0.00 seconds\n",
      " Time for constraint functions                  0.11 seconds\n",
      " Time for objective function                    0.00 seconds\n",
      "Setting the init for x\n",
      "Settiing the init for u\n",
      " ==============================\n",
      "    SNOPT  C interface  2.2.0   \n",
      " ==============================\n",
      " S N O P T  7.7.7    (Feb 2021)\n",
      " ==============================\n",
      "\n",
      " SNMEMB EXIT 100 -- finished successfully\n",
      " SNMEMB INFO 104 -- memory requirements estimated\n",
      "\n",
      " Trial version of SNOPT -- for evaluation or academic purposes only\n",
      "\n",
      "\n",
      "\n",
      " Nonlinear constraints     304     Linear constraints       0\n",
      " Nonlinear variables       254     Linear variables         0\n",
      " Jacobian  variables       254     Objective variables    254\n",
      " Total constraints         304     Total variables        254\n",
      "\n",
      "\n",
      "\n",
      " The user has defined    1304   out of    1304   constraint gradients.\n",
      " The user has defined     254   out of     254   objective  gradients.\n",
      "\n",
      "\n",
      " Major Minors     Step   nCon Feasible  Optimal  MeritFunction     nS Penalty\n",
      "     0     44               1 (6.3E-11)(4.0E-11) 2.8093397E+04                  r\n",
      "\n",
      " SNOPTC EXIT   0 -- finished successfully\n",
      " SNOPTC INFO   1 -- optimality conditions satisfied\n",
      "\n",
      " Problem name                 solver\n",
      " No. of iterations                  44   Objective            2.8093396979E+04\n",
      " No. of major iterations             0   Linear    obj. term  0.0000000000E+00\n",
      " Penalty parameter           0.000E+00   Nonlinear obj. term  2.8093396979E+04\n",
      " User function calls (total)         2\n",
      " No. of degenerate steps            38   Percentage                      86.36\n",
      " Max x                     202 3.2E+01   Max pi                    126 5.7E+03\n",
      " Max Primal infeas         542 2.0E-09   Max Dual infeas           200 2.3E-07\n",
      " Nonlinear constraint violn    2.0E-09\n",
      "\n",
      "\n",
      "\n",
      " Solution printed on file  10\n",
      "      solver  :   t_proc      (avg)   t_wall      (avg)    n_eval\n",
      "   nlp_jac_f  | 188.00us ( 47.00us) 145.71us ( 36.43us)         4\n",
      "   nlp_jac_g  | 154.37ms ( 38.59ms) 148.69ms ( 37.17ms)         4\n",
      "       total  | 158.36ms (158.36ms) 152.53ms (152.53ms)         1\n",
      "Solve successfully\n",
      "\n",
      " Time for MPS input                             0.00 seconds\n",
      " Time for solving problem                       0.07 seconds\n",
      " Time for solution output                       0.00 seconds\n",
      " Time for constraint functions                  0.11 seconds\n",
      " Time for objective function                    0.00 seconds\n",
      "Setting the init for x\n",
      "Settiing the init for u\n",
      " ==============================\n",
      "    SNOPT  C interface  2.2.0   \n",
      " ==============================\n",
      " S N O P T  7.7.7    (Feb 2021)\n",
      " ==============================\n",
      "\n",
      " SNMEMB EXIT 100 -- finished successfully\n",
      " SNMEMB INFO 104 -- memory requirements estimated\n",
      "\n",
      " Trial version of SNOPT -- for evaluation or academic purposes only\n",
      "\n",
      "\n",
      "\n",
      " Nonlinear constraints     304     Linear constraints       0\n",
      " Nonlinear variables       254     Linear variables         0\n",
      " Jacobian  variables       254     Objective variables    254\n",
      " Total constraints         304     Total variables        254\n",
      "\n",
      "\n",
      "\n",
      " The user has defined    1304   out of    1304   constraint gradients.\n",
      " The user has defined     254   out of     254   objective  gradients.\n",
      "\n",
      "\n",
      " Major Minors     Step   nCon Feasible  Optimal  MeritFunction     nS Penalty\n",
      "     0     45               1 (6.2E-11)(3.8E-11) 2.8881987E+04                  r\n",
      "\n",
      " SNOPTC EXIT   0 -- finished successfully\n",
      " SNOPTC INFO   1 -- optimality conditions satisfied\n",
      "\n",
      " Problem name                 solver\n",
      " No. of iterations                  45   Objective            2.8881987439E+04\n",
      " No. of major iterations             0   Linear    obj. term  0.0000000000E+00\n",
      " Penalty parameter           0.000E+00   Nonlinear obj. term  2.8881987439E+04\n",
      " User function calls (total)         2\n",
      " No. of degenerate steps            39   Percentage                      86.67\n",
      " Max x                     202 3.2E+01   Max pi                    122 6.0E+03\n",
      " Max Primal infeas         538 2.0E-09   Max Dual infeas           196 2.3E-07\n",
      " Nonlinear constraint violn    2.0E-09\n",
      "\n",
      "\n",
      "\n",
      " Solution printed on file  10\n",
      "      solver  :   t_proc      (avg)   t_wall      (avg)    n_eval\n",
      "   nlp_jac_f  | 154.00us ( 38.50us) 147.10us ( 36.77us)         4\n",
      "   nlp_jac_g  | 146.70ms ( 36.67ms) 146.40ms ( 36.60ms)         4\n",
      "       total  | 150.58ms (150.58ms) 150.19ms (150.19ms)         1\n",
      "Solve successfully\n",
      "\n",
      " Time for MPS input                             0.00 seconds\n",
      " Time for solving problem                       0.07 seconds\n",
      " Time for solution output                       0.00 seconds\n",
      " Time for constraint functions                  0.11 seconds\n",
      " Time for objective function                    0.00 seconds\n",
      "Setting the init for x\n",
      "Settiing the init for u\n",
      " ==============================\n",
      "    SNOPT  C interface  2.2.0   \n",
      " ==============================\n",
      " S N O P T  7.7.7    (Feb 2021)\n",
      " ==============================\n",
      "\n",
      " SNMEMB EXIT 100 -- finished successfully\n",
      " SNMEMB INFO 104 -- memory requirements estimated\n",
      "\n",
      " Trial version of SNOPT -- for evaluation or academic purposes only\n",
      "\n",
      "\n",
      "\n",
      " Nonlinear constraints     304     Linear constraints       0\n",
      " Nonlinear variables       254     Linear variables         0\n",
      " Jacobian  variables       254     Objective variables    254\n",
      " Total constraints         304     Total variables        254\n",
      "\n",
      "\n",
      "\n",
      " The user has defined    1304   out of    1304   constraint gradients.\n",
      " The user has defined     254   out of     254   objective  gradients.\n",
      "\n",
      "\n",
      " Major Minors     Step   nCon Feasible  Optimal  MeritFunction     nS Penalty\n",
      "     0     45               1 (6.2E-11)(3.7E-11) 2.9682199E+04                  r\n",
      "\n",
      " SNOPTC EXIT   0 -- finished successfully\n",
      " SNOPTC INFO   1 -- optimality conditions satisfied\n",
      "\n",
      " Problem name                 solver\n",
      " No. of iterations                  45   Objective            2.9682199463E+04\n",
      " No. of major iterations             0   Linear    obj. term  0.0000000000E+00\n",
      " Penalty parameter           0.000E+00   Nonlinear obj. term  2.9682199463E+04\n",
      " User function calls (total)         2\n",
      " No. of degenerate steps            39   Percentage                      86.67\n",
      " Max x                     202 3.2E+01   Max pi                    118 6.2E+03\n",
      " Max Primal infeas         534 2.0E-09   Max Dual infeas           192 2.3E-07\n",
      " Nonlinear constraint violn    2.0E-09\n",
      "\n",
      "\n",
      "\n",
      " Solution printed on file  10\n",
      "      solver  :   t_proc      (avg)   t_wall      (avg)    n_eval\n",
      "   nlp_jac_f  | 149.00us ( 37.25us) 141.72us ( 35.43us)         4\n",
      "   nlp_jac_g  | 141.65ms ( 35.41ms) 141.51ms ( 35.38ms)         4\n",
      "       total  | 145.37ms (145.37ms) 145.06ms (145.06ms)         1\n",
      "Solve successfully\n",
      "\n",
      " Time for MPS input                             0.00 seconds\n",
      " Time for solving problem                       0.07 seconds\n",
      " Time for solution output                       0.00 seconds\n",
      " Time for constraint functions                  0.11 seconds\n",
      " Time for objective function                    0.00 seconds\n",
      "Setting the init for x\n",
      "Settiing the init for u\n",
      " ==============================\n",
      "    SNOPT  C interface  2.2.0   \n",
      " ==============================\n",
      " S N O P T  7.7.7    (Feb 2021)\n",
      " ==============================\n",
      "\n",
      " SNMEMB EXIT 100 -- finished successfully\n",
      " SNMEMB INFO 104 -- memory requirements estimated\n",
      "\n",
      " Trial version of SNOPT -- for evaluation or academic purposes only\n",
      "\n",
      "\n",
      "\n",
      " Nonlinear constraints     304     Linear constraints       0\n",
      " Nonlinear variables       254     Linear variables         0\n",
      " Jacobian  variables       254     Objective variables    254\n",
      " Total constraints         304     Total variables        254\n",
      "\n",
      "\n",
      "\n",
      " The user has defined    1304   out of    1304   constraint gradients.\n",
      " The user has defined     254   out of     254   objective  gradients.\n",
      "\n",
      "\n",
      " Major Minors     Step   nCon Feasible  Optimal  MeritFunction     nS Penalty\n",
      "     0     44               1 (6.1E-11)(3.5E-11) 3.0492777E+04                  r\n",
      "\n",
      " SNOPTC EXIT   0 -- finished successfully\n",
      " SNOPTC INFO   1 -- optimality conditions satisfied\n",
      "\n",
      " Problem name                 solver\n",
      " No. of iterations                  44   Objective            3.0492777479E+04\n",
      " No. of major iterations             0   Linear    obj. term  0.0000000000E+00\n",
      " Penalty parameter           0.000E+00   Nonlinear obj. term  3.0492777479E+04\n",
      " User function calls (total)         2\n",
      " No. of degenerate steps            37   Percentage                      84.09\n",
      " Max x                     202 3.3E+01   Max pi                    114 6.5E+03\n",
      " Max Primal infeas         530 2.0E-09   Max Dual infeas           188 2.3E-07\n",
      " Nonlinear constraint violn    2.0E-09\n",
      "\n",
      "\n",
      "\n",
      " Solution printed on file  10\n",
      "      solver \n",
      " Time for MPS input                             0.00 seconds\n",
      " Time for solving problem                       0.07 seconds\n",
      " Time for solution output                       0.00 seconds\n",
      " Time for constraint functions                  0.11 seconds\n",
      " Time for objective function                    0.00 seconds\n",
      " :   t_proc      (avg)   t_wall      (avg)    n_eval\n",
      "   nlp_jac_f  | 151.00us ( 37.75us) 143.71us ( 35.93us)         4\n",
      "   nlp_jac_g  | 145.47ms ( 36.37ms) 145.36ms ( 36.34ms)         4\n",
      "       total  | 149.36ms (149.36ms) 149.14ms (149.14ms)         1\n",
      "Solve successfully\n",
      "Setting the init for x\n",
      "Settiing the init for u\n",
      " ==============================\n",
      "    SNOPT  C interface  2.2.0   \n",
      " ==============================\n",
      " S N O P T  7.7.7    (Feb 2021)\n",
      " ==============================\n",
      "\n",
      " SNMEMB EXIT 100 -- finished successfully\n",
      " SNMEMB INFO 104 -- memory requirements estimated\n",
      "\n",
      " Trial version of SNOPT -- for evaluation or academic purposes only\n",
      "\n",
      "\n",
      "\n",
      " Nonlinear constraints     304     Linear constraints       0\n",
      " Nonlinear variables       254     Linear variables         0\n",
      " Jacobian  variables       254     Objective variables    254\n",
      " Total constraints         304     Total variables        254\n",
      "\n",
      "\n",
      "\n",
      " The user has defined    1304   out of    1304   constraint gradients.\n",
      " The user has defined     254   out of     254   objective  gradients.\n",
      "\n",
      "\n",
      " Major Minors     Step   nCon Feasible  Optimal  MeritFunction     nS Penalty\n",
      "     0     44               1 (6.0E-11)(3.4E-11) 3.1313149E+04                  r\n",
      "\n",
      " SNOPTC EXIT   0 -- finished successfully\n",
      " SNOPTC INFO   1 -- optimality conditions satisfied\n",
      "\n",
      " Problem name                 solver\n",
      " No. of iterations                  44   Objective            3.1313148965E+04\n",
      " No. of major iterations             0   Linear    obj. term  0.0000000000E+00\n",
      " Penalty parameter           0.000E+00   Nonlinear obj. term  3.1313148965E+04\n",
      " User function calls (total)         2\n",
      " No. of degenerate steps            39   Percentage                      88.64\n",
      " Max x                     202 3.3E+01   Max pi                    110 6.8E+03\n",
      " Max Primal infeas         526 2.0E-09   Max Dual infeas           180 2.3E-07\n",
      " Nonlinear constraint violn    2.0E-09\n",
      "\n",
      "\n",
      "\n",
      " Solution printed on file  10\n",
      "      solver  :   t_proc      (avg)   t_wall      (avg)    n_eval\n",
      "   nlp_jac_f  | 144.00us ( 36.00us) 130.69us ( 32.67us)         4\n",
      "   nlp_jac_g  | 145.98ms ( 36.49ms) 145.87ms ( 36.47ms)         4\n",
      "       total  | 149.92ms (149.92ms) 149.65ms (149.65ms)         1\n",
      "Solve successfully\n",
      "\n",
      " Time for MPS input                             0.00 seconds\n",
      " Time for solving problem                       0.07 seconds\n",
      " Time for solution output                       0.00 seconds\n",
      " Time for constraint functions                  0.11 seconds\n",
      " Time for objective function                    0.00 seconds\n",
      "Setting the init for x\n",
      "Settiing the init for u\n",
      " ==============================\n",
      "    SNOPT  C interface  2.2.0   \n",
      " ==============================\n",
      " S N O P T  7.7.7    (Feb 2021)\n",
      " ==============================\n",
      "\n",
      " SNMEMB EXIT 100 -- finished successfully\n",
      " SNMEMB INFO 104 -- memory requirements estimated\n",
      "\n",
      " Trial version of SNOPT -- for evaluation or academic purposes only\n",
      "\n",
      "\n",
      "\n",
      " Nonlinear constraints     304     Linear constraints       0\n",
      " Nonlinear variables       254     Linear variables         0\n",
      " Jacobian  variables       254     Objective variables    254\n",
      " Total constraints         304     Total variables        254\n",
      "\n",
      "\n",
      "\n",
      " The user has defined    1304   out of    1304   constraint gradients.\n",
      " The user has defined     254   out of     254   objective  gradients.\n",
      "\n",
      "\n",
      " Major Minors     Step   nCon Feasible  Optimal  MeritFunction     nS Penalty\n",
      "     0     43               1 (6.0E-11)(3.2E-11) 3.2143732E+04                  r\n",
      "\n",
      " SNOPTC EXIT   0 -- finished successfully\n",
      " SNOPTC INFO   1 -- optimality conditions satisfied\n",
      "\n",
      " Problem name                 solver\n",
      " No. of iterations                  43   Objective            3.2143731523E+04\n",
      " No. of major iterations             0   Linear    obj. term  0.0000000000E+00\n",
      " Penalty parameter           0.000E+00   Nonlinear obj. term  3.2143731523E+04\n",
      " User function calls (total)         2\n",
      " No. of degenerate steps            38   Percentage                      88.37\n",
      " Max x                     202 3.3E+01   Max pi                    106 7.0E+03\n",
      " Max Primal infeas         522 2.0E-09   Max Dual infeas           176 2.3E-07\n",
      " Nonlinear constraint violn    2.0E-09\n",
      "\n",
      "\n",
      "\n",
      " Solution printed on file  10\n",
      "      solver  :   t_proc      (avg)   t_wall      (avg)    n_eval\n",
      "   nlp_jac_f  | 187.00us ( 46.75us) 145.02us ( 36.26us)         4\n",
      "   nlp_jac_g  | 152.41ms ( 38.10ms) 149.53ms ( 37.38ms)         4\n",
      "       total  | 156.39ms (156.39ms) 153.39ms (153.39ms)         1\n",
      "Solve successfully\n",
      "\n",
      " Time for MPS input                             0.00 seconds\n",
      " Time for solving problem                       0.08 seconds\n",
      " Time for solution output                       0.00 seconds\n",
      " Time for constraint functions                  0.11 seconds\n",
      " Time for objective function                    0.00 seconds\n",
      "Setting the init for x\n",
      "Settiing the init for u\n",
      " ==============================\n",
      "    SNOPT  C interface  2.2.0   \n",
      " ==============================\n",
      " S N O P T  7.7.7    (Feb 2021)\n",
      " ==============================\n",
      "\n",
      " SNMEMB EXIT 100 -- finished successfully\n",
      " SNMEMB INFO 104 -- memory requirements estimated\n",
      "\n",
      " Trial version of SNOPT -- for evaluation or academic purposes only\n",
      "\n",
      "\n",
      "\n",
      " Nonlinear constraints     304     Linear constraints       0\n",
      " Nonlinear variables       254     Linear variables         0\n",
      " Jacobian  variables       254     Objective variables    254\n",
      " Total constraints         304     Total variables        254\n",
      "\n",
      "\n",
      "\n",
      " The user has defined    1304   out of    1304   constraint gradients.\n",
      " The user has defined     254   out of     254   objective  gradients.\n",
      "\n",
      "\n",
      " Major Minors     Step   nCon Feasible  Optimal  MeritFunction     nS Penalty\n",
      "     0     44               1 (5.9E-11)(3.1E-11) 3.2985379E+04                  r\n",
      "\n",
      " SNOPTC EXIT   0 -- finished successfully\n",
      " SNOPTC INFO   1 -- optimality conditions satisfied\n",
      "\n",
      " Problem name                 solver\n",
      " No. of iterations                  44   Objective            3.2985378781E+04\n",
      " No. of major iterations             0   Linear    obj. term  0.0000000000E+00\n",
      " Penalty parameter           0.000E+00   Nonlinear obj. term  3.2985378781E+04\n",
      " User function calls (total)         2\n",
      " No. of degenerate steps            38   Percentage                      86.36\n",
      " Max x                     202 3.4E+01   Max pi                      2 7.3E+03\n",
      " Max Primal infeas         518 2.0E-09   Max Dual infeas           172 2.3E-07\n",
      " Nonlinear constraint violn    2.0E-09\n",
      "\n",
      "\n",
      "\n",
      " Solution printed on file  10\n",
      "      solver  :   t_proc      (avg)   t_wall      (avg)    n_eval\n",
      "   nlp_jac_f  | 181.00us ( 45.25us) 145.48us ( 36.37us)         4\n",
      "   nlp_jac_g  | 144.47ms ( 36.12ms) 144.38ms ( 36.10ms)         4\n",
      "       total  | 148.37ms (148.37ms) 148.20ms (148.20ms)         1\n",
      "Solve successfully\n",
      "\n",
      " Time for MPS input                             0.00 seconds\n",
      " Time for solving problem                       0.07 seconds\n",
      " Time for solution output                       0.00 seconds\n",
      " Time for constraint functions                  0.11 seconds\n",
      " Time for objective function                    0.00 seconds\n",
      "Setting the init for x\n",
      "Settiing the init for u\n",
      " ==============================\n",
      "    SNOPT  C interface  2.2.0   \n",
      " ==============================\n",
      " S N O P T  7.7.7    (Feb 2021)\n",
      " ==============================\n",
      "\n",
      " SNMEMB EXIT 100 -- finished successfully\n",
      " SNMEMB INFO 104 -- memory requirements estimated\n",
      "\n",
      " Trial version of SNOPT -- for evaluation or academic purposes only\n",
      "\n",
      "\n",
      "\n",
      " Nonlinear constraints     304     Linear constraints       0\n",
      " Nonlinear variables       254     Linear variables         0\n",
      " Jacobian  variables       254     Objective variables    254\n",
      " Total constraints         304     Total variables        254\n",
      "\n",
      "\n",
      "\n",
      " The user has defined    1304   out of    1304   constraint gradients.\n",
      " The user has defined     254   out of     254   objective  gradients.\n",
      "\n",
      "\n",
      " Major Minors     Step   nCon Feasible  Optimal  MeritFunction     nS Penalty\n",
      "     0     46               1 (5.9E-11) 6.7E-06  3.3838827E+04      2           r\n",
      "     1      2  1.0E+00      2  1.0E-06  1.1E-05  3.3838827E+04                  r\n",
      "     2      0  1.7E-01      4  9.4E-06  1.5E-05  3.3839123E+04                  rl\n",
      "     3      0  1.0E+00      5  2.1E-04  2.3E-05  3.3841259E+04                sm\n",
      "     4      0  1.0E+00      6 (2.5E-09)(1.4E-14) 3.3841260E+04\n",
      "\n",
      " SNOPTC EXIT   0 -- finished successfully\n",
      " SNOPTC INFO   1 -- optimality conditions satisfied\n",
      "\n",
      " Problem name                 solver\n",
      " No. of iterations                  48   Objective            3.3841259529E+04\n",
      " No. of major iterations             4   Linear    obj. term  0.0000000000E+00\n",
      " Penalty parameter           0.000E+00   Nonlinear obj. term  3.3841259529E+04\n",
      " User function calls (total)         7\n",
      " No. of degenerate steps            37   Percentage                      77.08\n",
      " Max x                     202 3.4E+01   Max pi                      2 7.4E+03\n",
      " Max Primal infeas         558 8.4E-08   Max Dual infeas           204 1.0E-10\n",
      " Nonlinear constraint violn    8.4E-08\n",
      "\n",
      "\n",
      "\n",
      " Solution printed on file  10\n",
      "      solver  :   t_proc      (avg)   t_wall      (avg)    n_eval\n",
      "   nlp_jac_f  | 517.00us ( 57.44us) 444.88us ( 49.43us)         9\n",
      "   nlp_jac_g  | 371.59ms ( 41.29ms) 371.09ms ( 41.23ms)         9\n",
      "       total  | 377.97ms (377.97ms) 377.22ms (377.22ms)         1\n",
      "Solve successfully\n",
      "\n",
      " Time for MPS input                             0.00 seconds\n",
      " Time for solving problem                       0.29 seconds\n",
      " Time for solution output                       0.00 seconds\n",
      " Time for constraint functions                  0.34 seconds\n",
      " Time for objective function                    0.00 seconds\n",
      "Setting the init for x\n",
      "Settiing the init for u\n",
      " ==============================\n",
      "    SNOPT  C interface  2.2.0   \n",
      " ==============================\n",
      " S N O P T  7.7.7    (Feb 2021)\n",
      " ==============================\n",
      "\n",
      " SNMEMB EXIT 100 -- finished successfully\n",
      " SNMEMB INFO 104 -- memory requirements estimated\n",
      "\n",
      " Trial version of SNOPT -- for evaluation or academic purposes only\n",
      "\n",
      "\n",
      "\n",
      " Nonlinear constraints     304     Linear constraints       0\n",
      " Nonlinear variables       254     Linear variables         0\n",
      " Jacobian  variables       254     Objective variables    254\n",
      " Total constraints         304     Total variables        254\n",
      "\n",
      "\n",
      "\n",
      " The user has defined    1304   out of    1304   constraint gradients.\n",
      " The user has defined     254   out of     254   objective  gradients.\n",
      "\n",
      "\n",
      " Major Minors     Step   nCon Feasible  Optimal  MeritFunction     nS Penalty\n",
      "     0     46               1 (2.4E-09) 2.5E-05  3.4710499E+04      1           r\n",
      "     1      1  1.0E+00      2  5.1E-06  3.6E-05  3.4710500E+04                  r\n",
      "     2      0  1.7E-01      4  4.3E-06  4.4E-05  3.4710863E+04                  rl\n",
      "     3      0  1.0E+00      5  7.5E-05 (6.6E-09) 3.4713009E+04                s\n",
      "     4      0  1.0E+00      6 (3.1E-15)(5.1E-15) 3.4713009E+04        2.6E+01\n",
      "\n",
      " SNOPTC EXIT   0 -- finished successfully\n",
      " SNOPTC INFO   1 -- optimality conditions satisfied\n",
      "\n",
      " Problem name                 solver\n",
      " No. of iterations                  47   Objective            3.4713008656E+04\n",
      " No. of major iterations             4   Linear    obj. term  0.0000000000E+00\n",
      " Penalty parameter           2.619E+01   Nonlinear obj. term  3.4713008656E+04\n",
      " User function calls (total)         7\n",
      " No. of degenerate steps            39   Percentage                      82.98\n",
      " Max x                     202 3.5E+01   Max pi                      2 5.6E+03\n",
      " Max Primal infeas         359 1.1E-13   Max Dual infeas            38 4.5E-13\n",
      " Nonlinear constraint violn    1.1E-13\n",
      "\n",
      "\n",
      "\n",
      " Solution printed on file  10\n",
      "      solver  :   t_proc      (avg)   t_wall      (avg)    n_eval\n",
      "   nlp_jac_f  | 458.00us ( 50.89us) 371.56us ( 41.28us)         9\n",
      "   nlp_jac_g  | 352.06ms ( 39.12ms) 350.68ms ( 38.96ms)         9\n",
      "       total  | 357.82ms (357.82ms) 356.17ms (356.17ms)         1\n",
      "Solve successfully\n",
      "\n",
      " Time for MPS input                             0.00 seconds\n",
      " Time for solving problem                       0.27 seconds\n",
      " Time for solution output                       0.00 seconds\n",
      " Time for constraint functions                  0.31 seconds\n",
      " Time for objective function                    0.00 seconds\n",
      "Setting the init for x\n",
      "Settiing the init for u\n",
      " ==============================\n",
      "    SNOPT  C interface  2.2.0   \n",
      " ==============================\n",
      " S N O P T  7.7.7    (Feb 2021)\n",
      " ==============================\n",
      "\n",
      " SNMEMB EXIT 100 -- finished successfully\n",
      " SNMEMB INFO 104 -- memory requirements estimated\n",
      "\n",
      " Trial version of SNOPT -- for evaluation or academic purposes only\n",
      "\n",
      "\n",
      "\n",
      " Nonlinear constraints     304     Linear constraints       0\n",
      " Nonlinear variables       254     Linear variables         0\n",
      " Jacobian  variables       254     Objective variables    254\n",
      " Total constraints         304     Total variables        254\n",
      "\n",
      "\n",
      "\n",
      " The user has defined    1304   out of    1304   constraint gradients.\n",
      " The user has defined     254   out of     254   objective  gradients.\n",
      "\n",
      "\n",
      " Major Minors     Step   nCon Feasible  Optimal  MeritFunction     nS Penalty\n",
      "     0     46               1 (3.1E-15) 5.0E-05  3.5599469E+04      1           r\n",
      "     1      1  1.0E+00      2  1.1E-05  6.5E-05  3.5599470E+04                  r\n",
      "     2      0  1.7E-01      4  1.3E-05  1.8E-03  3.5600003E+04                sm l\n",
      "     3      0  1.0E+00      5  3.4E-04 (7.7E-09) 3.5603011E+04\n",
      "     4      0  1.0E+00      6 (6.1E-16)(3.6E-15) 3.5603011E+04        2.5E-03\n",
      "\n",
      " SNOPTC EXIT   0 -- finished successfully\n",
      " SNOPTC INFO   1 -- optimality conditions satisfied\n",
      "\n",
      " Problem name                 solver\n",
      " No. of iterations                  47   Objective            3.5603011481E+04\n",
      " No. of major iterations             4   Linear    obj. term  0.0000000000E+00\n",
      " Penalty parameter           2.498E-03   Nonlinear obj. term  3.5603011481E+04\n",
      " User function calls (total)         7\n",
      " No. of degenerate steps            39   Percentage                      82.98\n",
      " Max x                     202 3.5E+01   Max pi                    166 4.4E+03\n",
      " Max Primal infeas         542 2.1E-14   Max Dual infeas            66 4.6E-13\n",
      " Nonlinear constraint violn    2.1E-14\n",
      "\n",
      "\n",
      "\n",
      " Solution printed on file  10\n",
      "      solver  :   t_proc      (avg)   t_wall      (avg)    n_eval\n",
      "   nlp_jac_f  | 377.00us ( 41.89us) 362.11us ( 40.23us)         9\n",
      "   nlp_jac_g  | 337.50ms ( 37.50ms) 337.73ms ( 37.53ms)         9\n",
      "       total  | 343.26ms (343.26ms) 343.30ms (343.30ms)         1\n",
      "Solve successfully\n",
      "\n",
      " Time for MPS input                             0.00 seconds\n",
      " Time for solving problem                       0.26 seconds\n",
      " Time for solution output                       0.00 seconds\n",
      " Time for constraint functions                  0.30 seconds\n",
      " Time for objective function                    0.00 seconds\n",
      "Setting the init for x\n",
      "Settiing the init for u\n",
      " ==============================\n",
      "    SNOPT  C interface  2.2.0   \n",
      " ==============================\n",
      " S N O P T  7.7.7    (Feb 2021)\n",
      " ==============================\n",
      "\n",
      " SNMEMB EXIT 100 -- finished successfully\n",
      " SNMEMB INFO 104 -- memory requirements estimated\n",
      "\n",
      " Trial version of SNOPT -- for evaluation or academic purposes only\n",
      "\n",
      "\n",
      "\n",
      " Nonlinear constraints     304     Linear constraints       0\n",
      " Nonlinear variables       254     Linear variables         0\n",
      " Jacobian  variables       254     Objective variables    254\n",
      " Total constraints         304     Total variables        254\n",
      "\n",
      "\n",
      "\n",
      " The user has defined    1304   out of    1304   constraint gradients.\n",
      " The user has defined     254   out of     254   objective  gradients.\n",
      "\n",
      "\n",
      " Major Minors     Step   nCon Feasible  Optimal  MeritFunction     nS Penalty\n",
      "     0     46               1 (6.0E-16) 5.2E-05  3.6507408E+04      1           r\n",
      "     1      1  1.0E+00      2  1.3E-05  6.8E-05  3.6507409E+04                  r\n",
      "     2      0  1.7E-01      4  1.2E-05  1.6E-04  3.6508002E+04                sm l\n",
      "     3      0  1.0E+00      5  3.0E-04 (2.2E-07) 3.6511314E+04\n",
      "     4      0  1.0E+00      6 (5.0E-16)(2.2E-07) 3.6511314E+04        2.8E-03\n",
      "\n",
      " SNOPTC EXIT   0 -- finished successfully\n",
      " SNOPTC INFO   1 -- optimality conditions satisfied\n",
      "\n",
      " Problem name                 solver\n",
      " No. of iterations                  47   Objective            3.6511314048E+04\n",
      " No. of major iterations             4   Linear    obj. term  0.0000000000E+00\n",
      " Penalty parameter           2.805E-03   Nonlinear obj. term  3.6511314048E+04\n",
      " User function calls (total)         7\n",
      " No. of degenerate steps            39   Percentage                      82.98\n",
      " Max x                     202 3.5E+01   Max pi                    162 4.6E+03\n",
      " Max Primal infeas         518 1.8E-14   Max Dual infeas           293 1.0E-03\n",
      " Nonlinear constraint violn    1.8E-14\n",
      "\n",
      "\n",
      "\n",
      " Solution printed on file  10\n",
      "      solver  :   t_proc      (avg)   t_wall      (avg)    n_eval\n",
      "   nlp_jac_f  | 510.00us ( 56.67us) 435.41us ( 48.38us)         9\n",
      "   nlp_jac_g  | 374.94ms ( 41.66ms) 374.67ms ( 41.63ms)         9\n",
      "       total  | 380.75ms (380.75ms) 380.24ms (380.24ms)         1\n",
      "Solve successfully\n",
      "\n",
      " Time for MPS input                             0.00 seconds\n",
      " Time for solving problem                       0.30 seconds\n",
      " Time for solution output                       0.00 seconds\n",
      " Time for constraint functions                  0.34 seconds\n",
      " Time for objective function                    0.00 seconds\n",
      "Setting the init for x\n",
      "Settiing the init for u\n",
      " ==============================\n",
      "    SNOPT  C interface  2.2.0   \n",
      " ==============================\n",
      " S N O P T  7.7.7    (Feb 2021)\n",
      " ==============================\n",
      "\n",
      " SNMEMB EXIT 100 -- finished successfully\n",
      " SNMEMB INFO 104 -- memory requirements estimated\n",
      "\n",
      " Trial version of SNOPT -- for evaluation or academic purposes only\n",
      "\n",
      "\n",
      "\n",
      " Nonlinear constraints     304     Linear constraints       0\n",
      " Nonlinear variables       254     Linear variables         0\n",
      " Jacobian  variables       254     Objective variables    254\n",
      " Total constraints         304     Total variables        254\n",
      "\n",
      "\n",
      "\n",
      " The user has defined    1304   out of    1304   constraint gradients.\n",
      " The user has defined     254   out of     254   objective  gradients.\n",
      "\n",
      "\n",
      " Major Minors     Step   nCon Feasible  Optimal  MeritFunction     nS Penalty\n",
      "     0     48               1 (5.0E-16) 4.1E-05  3.7432806E+04      2           r\n",
      "     1      2  1.0E+00      2  8.8E-06  5.3E-05  3.7432807E+04      1           r\n",
      "     2      1  1.7E-01      4  6.1E-06  6.6E-05  3.7433342E+04      1           rl\n",
      "     3      1  1.0E+00      5  1.5E-04  1.4E-02  3.7436555E+04                s\n",
      "     4      0  1.0E+00      6 (5.5E-07)(1.9E-07) 3.7437153E+04\n",
      "\n",
      " SNOPTC EXIT   0 -- finished successfully\n",
      " SNOPTC INFO   1 -- optimality conditions satisfied\n",
      "\n",
      " Problem name                 solver\n",
      " No. of iterations                  52   Objective            3.7437153212E+04\n",
      " No. of major iterations             4   Linear    obj. term  0.0000000000E+00\n",
      " Penalty parameter           0.000E+00   Nonlinear obj. term  3.7437153212E+04\n",
      " User function calls (total)         7\n",
      " No. of degenerate steps            41   Percentage                      78.85\n",
      " Max x                     202 3.6E+01   Max pi                    158 4.2E+03\n",
      " Max Primal infeas         546 2.0E-05   Max Dual infeas           134 7.8E-04\n",
      " Nonlinear constraint violn    2.0E-05\n",
      "\n",
      "\n",
      "\n",
      " Solution printed on file  10\n",
      "      solver  :   t_proc      (avg)   t_wall      (avg)    n_eval\n",
      "   nlp_jac_f  | 359.00us ( 39.89us) 346.89us ( 38.54us)         9\n",
      "   nlp_jac_g  | 339.67ms ( 37.74ms) 339.86ms ( 37.76ms)         9\n",
      "       total  | 345.13ms (345.13ms) 345.08ms (345.08ms)         1\n",
      "Solve successfully\n",
      "\n",
      " Time for MPS input                             0.00 seconds\n",
      " Time for solving problem                       0.26 seconds\n",
      " Time for solution output                       0.00 seconds\n",
      " Time for constraint functions                  0.30 seconds\n",
      " Time for objective function                    0.00 seconds\n",
      "Setting the init for x\n",
      "Settiing the init for u\n",
      " ==============================\n",
      "    SNOPT  C interface  2.2.0   \n",
      " ==============================\n",
      " S N O P T  7.7.7    (Feb 2021)\n",
      " ==============================\n",
      "\n",
      " SNMEMB EXIT 100 -- finished successfully\n",
      " SNMEMB INFO 104 -- memory requirements estimated\n",
      "\n",
      " Trial version of SNOPT -- for evaluation or academic purposes only\n",
      "\n",
      "\n",
      "\n",
      " Nonlinear constraints     304     Linear constraints       0\n",
      " Nonlinear variables       254     Linear variables         0\n",
      " Jacobian  variables       254     Objective variables    254\n",
      " Total constraints         304     Total variables        254\n",
      "\n",
      "\n",
      "\n",
      " The user has defined    1304   out of    1304   constraint gradients.\n",
      " The user has defined     254   out of     254   objective  gradients.\n",
      "\n",
      "\n",
      " Major Minors     Step   nCon Feasible  Optimal  MeritFunction     nS Penalty\n",
      "     0     47               1 (5.5E-07) 2.6E-05  3.8374182E+04      1           r\n",
      "     1      1  1.3E-08      7 (5.5E-07) 2.6E-05  3.8374181E+04      1 2.8E+06   r\n",
      "     2      1  1.6E-08     13 (5.5E-07) 3.1E-05  3.8374181E+04      1 2.8E+06 sm\n",
      "     3      1  1.0E+00     15  1.4E-04  6.2E-05  3.8374185E+04      1 2.4E+03\n",
      "     4      1  1.0E+00     17 (4.4E-08) 6.1E-05  3.8374229E+04      1 1.2E+02   R\n",
      "     5      1  1.0E+00     19 (2.5E-08) 6.1E-05  3.8374259E+04      1 4.0E+01   R\n",
      "     6      1  1.0E+00     21 (2.6E-08) 4.1E-05  3.8374290E+04                  r\n",
      "     7      0  1.0E+00     22  7.7E-05 (5.0E-09) 3.8376309E+04                s\n",
      "     8      0  1.0E+00     23 (7.5E-15)(6.7E-15) 3.8376309E+04\n",
      "\n",
      " SNOPTC EXIT   0 -- finished successfully\n",
      " SNOPTC INFO   1 -- optimality conditions satisfied\n",
      "\n",
      " Problem name                 solver\n",
      " No. of iterations                  53   Objective            3.8376308626E+04\n",
      " No. of major iterations             8   Linear    obj. term  0.0000000000E+00\n",
      " Penalty parameter           0.000E+00   Nonlinear obj. term  3.8376308626E+04\n",
      " User function calls (total)        24\n",
      " No. of degenerate steps            31   Percentage                      58.49\n",
      " Max x                     202 3.6E+01   Max pi                    154 4.3E+03\n",
      " Max Primal infeas         548 2.7E-13   Max Dual infeas             2 4.4E-13\n",
      " Nonlinear constraint violn    2.7E-13\n",
      "\n",
      "\n",
      "\n",
      " Solution printed on file  10\n",
      "      solver  :   t_proc      (avg)   t_wall      (avg)    n_eval\n",
      "   nlp_jac_f  | 943.00us ( 36.27us) 928.52us ( 35.71us)        26\n",
      "   nlp_jac_g  | 963.00ms ( 37.04ms) 963.66ms ( 37.06ms)        26\n",
      "       total  | 970.72ms (970.72ms) 971.07ms (971.07ms)         1\n",
      "Solve successfully\n",
      "\n",
      " Time for MPS input                             0.00 seconds\n",
      " Time for solving problem                       0.89 seconds\n",
      " Time for solution output                       0.00 seconds\n",
      " Time for constraint functions                  0.93 seconds\n",
      " Time for objective function                    0.00 seconds\n",
      "Setting the init for x\n",
      "Settiing the init for u\n",
      " ==============================\n",
      "    SNOPT  C interface  2.2.0   \n",
      " ==============================\n",
      " S N O P T  7.7.7    (Feb 2021)\n",
      " ==============================\n",
      "\n",
      " SNMEMB EXIT 100 -- finished successfully\n",
      " SNMEMB INFO 104 -- memory requirements estimated\n",
      "\n",
      " Trial version of SNOPT -- for evaluation or academic purposes only\n",
      "\n",
      "\n",
      "\n",
      " Nonlinear constraints     304     Linear constraints       0\n",
      " Nonlinear variables       254     Linear variables         0\n",
      " Jacobian  variables       254     Objective variables    254\n",
      " Total constraints         304     Total variables        254\n",
      "\n",
      "\n",
      "\n",
      " The user has defined    1304   out of    1304   constraint gradients.\n",
      " The user has defined     254   out of     254   objective  gradients.\n",
      "\n",
      "\n",
      " Major Minors     Step   nCon Feasible  Optimal  MeritFunction     nS Penalty\n",
      "     0     46               1 (7.4E-15) 4.3E-06  3.9326606E+04      1           r\n",
      "     1      1  1.0E+00      2 (3.5E-07) 1.3E-05  3.9326606E+04                  r\n",
      "     2      0  1.7E-01      4 (8.0E-07) 1.9E-05  3.9326715E+04                  rl\n",
      "     3      0  1.0E+00      5  2.0E-05 (7.5E-10) 3.9327571E+04                  r\n",
      "     4      0  1.0E+00      6 (4.9E-16)(3.6E-15) 3.9327571E+04                  r\n",
      "\n",
      " SNOPTC EXIT   0 -- finished successfully\n",
      " SNOPTC INFO   1 -- optimality conditions satisfied\n",
      "\n",
      " Problem name                 solver\n",
      " No. of iterations                  47   Objective            3.9327570922E+04\n",
      " No. of major iterations             4   Linear    obj. term  0.0000000000E+00\n",
      " Penalty parameter           0.000E+00   Nonlinear obj. term  3.9327570922E+04\n",
      " User function calls (total)         7\n",
      " No. of degenerate steps            39   Percentage                      82.98\n",
      " Max x                     202 3.6E+01   Max pi                    150 4.5E+03\n",
      " Max Primal infeas         394 1.8E-14   Max Dual infeas            46 3.6E-13\n",
      " Nonlinear constraint violn    1.8E-14\n",
      "\n",
      "\n",
      "\n",
      " Solution printed on file  10\n",
      "      solver  :   t_proc      (avg)   t_wall      (avg)    n_eval\n",
      "   nlp_jac_f  | 481.00us ( 53.44us) 415.12us ( 46.12us)         9\n",
      "   nlp_jac_g  | 392.65ms ( 43.63ms) 393.45ms ( 43.72ms)         9\n",
      "       total  | 398.30ms (398.30ms) 398.87ms (398.87ms)         1\n",
      "Solve successfully\n",
      "\n",
      " Time for MPS input                             0.00 seconds\n",
      " Time for solving problem                       0.32 seconds\n",
      " Time for solution output                       0.00 seconds\n",
      " Time for constraint functions                  0.36 seconds\n",
      " Time for objective function                    0.00 seconds\n",
      "Setting the init for x\n",
      "Settiing the init for u\n",
      " ==============================\n",
      "    SNOPT  C interface  2.2.0   \n",
      " ==============================\n",
      " S N O P T  7.7.7    (Feb 2021)\n",
      " ==============================\n",
      "\n",
      " SNMEMB EXIT 100 -- finished successfully\n",
      " SNMEMB INFO 104 -- memory requirements estimated\n",
      "\n",
      " Trial version of SNOPT -- for evaluation or academic purposes only\n",
      "\n",
      "\n",
      "\n",
      " Nonlinear constraints     304     Linear constraints       0\n",
      " Nonlinear variables       254     Linear variables         0\n",
      " Jacobian  variables       254     Objective variables    254\n",
      " Total constraints         304     Total variables        254\n",
      "\n",
      "\n",
      "\n",
      " The user has defined    1304   out of    1304   constraint gradients.\n",
      " The user has defined     254   out of     254   objective  gradients.\n",
      "\n",
      "\n",
      " Major Minors     Step   nCon Feasible  Optimal  MeritFunction     nS Penalty\n",
      "     0     44               1 (4.8E-16)(7.4E-15) 4.0289443E+04                  r\n",
      "\n",
      " SNOPTC EXIT   0 -- finished successfully\n",
      " SNOPTC INFO   1 -- optimality conditions satisfied\n",
      "\n",
      " Problem name                 solver\n",
      " No. of iterations                  44   Objective            4.0289442523E+04\n",
      " No. of major iterations             0   Linear    obj. term  0.0000000000E+00\n",
      " Penalty parameter           0.000E+00   Nonlinear obj. term  4.0289442523E+04\n",
      " User function calls (total)         2\n",
      " No. of degenerate steps            39   Percentage                      88.64\n",
      " Max x                     202 3.7E+01   Max pi                    146 4.6E+03\n",
      " Max Primal infeas         390 1.8E-14   Max Dual infeas           176 3.4E-11\n",
      " Nonlinear constraint violn    1.8E-14\n",
      "\n",
      "\n",
      "\n",
      " Solution printed on file  10\n",
      "      solver  :   t_proc      (avg)   t_wall      (avg)    n_eval\n",
      "   nlp_jac_f  | 154.00us ( 38.50us) 149.67us ( 37.42us)         4\n",
      "   nlp_jac_g  | 153.54ms ( 38.39ms) 153.27ms ( 38.32ms)         4\n",
      "       total  | 157.65ms (157.65ms) 157.29ms (157.29ms)         1\n",
      "Solve successfully\n",
      "\n",
      " Time for MPS input                             0.00 seconds\n",
      " Time for solving problem                       0.08 seconds\n",
      " Time for solution output                       0.00 seconds\n",
      " Time for constraint functions                  0.12 seconds\n",
      " Time for objective function                    0.00 seconds\n",
      "Setting the init for x\n",
      "Settiing the init for u\n",
      " ==============================\n",
      "    SNOPT  C interface  2.2.0   \n",
      " ==============================\n",
      " S N O P T  7.7.7    (Feb 2021)\n",
      " ==============================\n",
      "\n",
      " SNMEMB EXIT 100 -- finished successfully\n",
      " SNMEMB INFO 104 -- memory requirements estimated\n",
      "\n",
      " Trial version of SNOPT -- for evaluation or academic purposes only\n",
      "\n",
      "\n",
      "\n",
      " Nonlinear constraints     304     Linear constraints       0\n",
      " Nonlinear variables       254     Linear variables         0\n",
      " Jacobian  variables       254     Objective variables    254\n",
      " Total constraints         304     Total variables        254\n",
      "\n",
      "\n",
      "\n",
      " The user has defined    1304   out of    1304   constraint gradients.\n",
      " The user has defined     254   out of     254   objective  gradients.\n",
      "\n",
      "\n",
      " Major Minors     Step   nCon Feasible  Optimal  MeritFunction     nS Penalty\n",
      "     0     44               1 (4.8E-16)(3.7E-15) 4.1261732E+04                  r\n",
      "\n",
      " SNOPTC EXIT   0 -- finished successfully\n",
      " SNOPTC INFO   1 -- optimality conditions satisfied\n",
      "\n",
      " Problem name                 solver\n",
      " No. of iterations                  44   Objective            4.1261731784E+04\n",
      " No. of major iterations             0   Linear    obj. term  0.0000000000E+00\n",
      " Penalty parameter           0.000E+00   Nonlinear obj. term  4.1261731784E+04\n",
      " User function calls (total)         2\n",
      " No. of degenerate steps            39   Percentage                      88.64\n",
      " Max x                     202 3.7E+01   Max pi                    142 4.8E+03\n",
      " Max Primal infeas         386 1.8E-14   Max Dual infeas            24 1.7E-11\n",
      " Nonlinear constraint violn    1.8E-14\n",
      "\n",
      "\n",
      "\n",
      " Solution printed on file  10\n",
      "      solver  :   t_proc      (avg)   t_wall      (avg)    n_eval\n",
      "   nlp_jac_f  | 170.00us ( 42.50us) 155.58us ( 38.89us)         4\n",
      "   nlp_jac_g  | 146.13ms ( 36.53ms) 144.62ms ( 36.16ms)         4\n",
      "       total  | 150.19ms (150.19ms) 148.59ms (148.59ms)         1\n",
      "Solve successfully\n",
      "\n",
      " Time for MPS input                             0.00 seconds\n",
      " Time for solving problem                       0.08 seconds\n",
      " Time for solution output                       0.00 seconds\n",
      " Time for constraint functions                  0.11 seconds\n",
      " Time for objective function                    0.00 seconds\n",
      "Setting the init for x\n",
      "Settiing the init for u\n",
      " ==============================\n",
      "    SNOPT  C interface  2.2.0   \n",
      " ==============================\n",
      " S N O P T  7.7.7    (Feb 2021)\n",
      " ==============================\n",
      "\n",
      " SNMEMB EXIT 100 -- finished successfully\n",
      " SNMEMB INFO 104 -- memory requirements estimated\n",
      "\n",
      " Trial version of SNOPT -- for evaluation or academic purposes only\n",
      "\n",
      "\n",
      "\n",
      " Nonlinear constraints     304     Linear constraints       0\n",
      " Nonlinear variables       254     Linear variables         0\n",
      " Jacobian  variables       254     Objective variables    254\n",
      " Total constraints         304     Total variables        254\n",
      "\n",
      "\n",
      "\n",
      " The user has defined    1304   out of    1304   constraint gradients.\n",
      " The user has defined     254   out of     254   objective  gradients.\n",
      "\n",
      "\n",
      " Major Minors     Step   nCon Feasible  Optimal  MeritFunction     nS Penalty\n",
      "     0     45               1 (4.7E-16)(3.9E-15) 4.2245136E+04                  r\n",
      "\n",
      " SNOPTC EXIT   0 -- finished successfully\n",
      " SNOPTC INFO   1 -- optimality conditions satisfied\n",
      "\n",
      " Problem name                 solver\n",
      " No. of iterations                  45   Objective            4.2245135706E+04\n",
      " No. of major iterations             0   Linear    obj. term  0.0000000000E+00\n",
      " Penalty parameter           0.000E+00   Nonlinear obj. term  4.2245135706E+04\n",
      " User function calls (total)         2\n",
      " No. of degenerate steps            39   Percentage                      86.67\n",
      " Max x                     202 3.7E+01   Max pi                    138 4.9E+03\n",
      " Max Primal infeas         382 1.8E-14   Max Dual infeas           122 1.9E-11\n",
      " Nonlinear constraint violn    1.8E-14\n",
      "\n",
      "\n",
      "\n",
      " Solution printed on file  10\n",
      "      solver \n",
      " Time for MPS input                             0.00 seconds\n",
      " Time for solving problem                       0.08 seconds\n",
      " Time for solution output                       0.00 seconds\n",
      " :   t_proc      (avg)   t_wall      (avg)    n_eval\n",
      "   nlp_jac_f  | 165.00us ( 41.25us) 126.20us ( 31.55us)         4\n",
      "   nlp_jac_g  | 148.78ms ( 37.20ms) 148.62ms ( 37.16ms)         4\n",
      "       total  | 152.84ms (152.84ms) 152.51ms (152.51ms)         1\n",
      "Solve successfully\n",
      " Time for constraint functions                  0.11 seconds\n",
      " Time for objective function                    0.00 seconds\n",
      "Setting the init for x\n",
      "Settiing the init for u\n",
      " ==============================\n",
      "    SNOPT  C interface  2.2.0   \n",
      " ==============================\n",
      " S N O P T  7.7.7    (Feb 2021)\n",
      " ==============================\n",
      "\n",
      " SNMEMB EXIT 100 -- finished successfully\n",
      " SNMEMB INFO 104 -- memory requirements estimated\n",
      "\n",
      " Trial version of SNOPT -- for evaluation or academic purposes only\n",
      "\n",
      "\n",
      "\n",
      " Nonlinear constraints     304     Linear constraints       0\n",
      " Nonlinear variables       254     Linear variables         0\n",
      " Jacobian  variables       254     Objective variables    254\n",
      " Total constraints         304     Total variables        254\n",
      "\n",
      "\n",
      "\n",
      " The user has defined    1304   out of    1304   constraint gradients.\n",
      " The user has defined     254   out of     254   objective  gradients.\n",
      "\n",
      "\n",
      " Major Minors     Step   nCon Feasible  Optimal  MeritFunction     nS Penalty\n",
      "     0     45               1 (4.7E-16)(6.9E-15) 4.3240827E+04                  r\n",
      "\n",
      " SNOPTC EXIT   0 -- finished successfully\n",
      " SNOPTC INFO   1 -- optimality conditions satisfied\n",
      "\n",
      " Problem name                 solver\n",
      " No. of iterations                  45   Objective            4.3240826774E+04\n",
      " No. of major iterations             0   Linear    obj. term  0.0000000000E+00\n",
      " Penalty parameter           0.000E+00   Nonlinear obj. term  4.3240826774E+04\n",
      " User function calls (total)         2\n",
      " No. of degenerate steps            40   Percentage                      88.89\n",
      " Max x                     202 3.8E+01   Max pi                    134 5.1E+03\n",
      " Max Primal infeas         378 1.8E-14   Max Dual infeas           164 3.6E-11\n",
      " Nonlinear constraint violn    1.8E-14\n",
      "\n",
      "\n",
      "\n",
      " Solution printed on file  10\n",
      "      solver  :   t_proc      (avg)   t_wall      (avg)    n_eval\n",
      "   nlp_jac_f  | 158.00us ( 39.50us) 144.06us ( 36.02us)         4\n",
      "   nlp_jac_g  | 149.41ms ( 37.35ms) 149.41ms ( 37.35ms)         4\n",
      "       total  | 153.35ms (153.35ms) 153.23ms (153.23ms)         1\n",
      "Solve successfully\n",
      "\n",
      " Time for MPS input                             0.00 seconds\n",
      " Time for solving problem                       0.08 seconds\n",
      " Time for solution output                       0.00 seconds\n",
      " Time for constraint functions                  0.11 seconds\n",
      " Time for objective function                    0.00 seconds\n",
      "Setting the init for x\n",
      "Settiing the init for u\n",
      " ==============================\n",
      "    SNOPT  C interface  2.2.0   \n",
      " ==============================\n",
      " S N O P T  7.7.7    (Feb 2021)\n",
      " ==============================\n",
      "\n",
      " SNMEMB EXIT 100 -- finished successfully\n",
      " SNMEMB INFO 104 -- memory requirements estimated\n",
      "\n",
      " Trial version of SNOPT -- for evaluation or academic purposes only\n",
      "\n",
      "\n",
      "\n",
      " Nonlinear constraints     304     Linear constraints       0\n",
      " Nonlinear variables       254     Linear variables         0\n",
      " Jacobian  variables       254     Objective variables    254\n",
      " Total constraints         304     Total variables        254\n",
      "\n",
      "\n",
      "\n",
      " The user has defined    1304   out of    1304   constraint gradients.\n",
      " The user has defined     254   out of     254   objective  gradients.\n",
      "\n",
      "\n",
      " Major Minors     Step   nCon Feasible  Optimal  MeritFunction     nS Penalty\n",
      "     0     43               1 (4.7E-16)(8.8E-14) 4.4249914E+04                  r\n",
      "\n",
      " SNOPTC EXIT   0 -- finished successfully\n",
      " SNOPTC INFO   1 -- optimality conditions satisfied\n",
      "\n",
      " Problem name                 solver\n",
      " No. of iterations                  43   Objective            4.4249914017E+04\n",
      " No. of major iterations             0   Linear    obj. term  0.0000000000E+00\n",
      " Penalty parameter           0.000E+00   Nonlinear obj. term  4.4249914017E+04\n",
      " User function calls (total)         2\n",
      " No. of degenerate steps            38   Percentage                      88.37\n",
      " Max x                     202 3.8E+01   Max pi                    130 5.3E+03\n",
      " Max Primal infeas         374 1.8E-14   Max Dual infeas           204 4.7E-10\n",
      " Nonlinear constraint violn    1.8E-14\n",
      "\n",
      "\n",
      "\n",
      " Solution printed on file  10\n",
      "      solver  :   t_proc      (avg)   t_wall      (avg)    n_eval\n",
      "   nlp_jac_f  | 144.00us ( 36.00us) 139.43us ( 34.86us)         4\n",
      "   nlp_jac_g  | 151.68ms ( 37.92ms) 151.73ms ( 37.93ms)         4\n",
      "       total  | 155.73ms (155.73ms) 155.66ms (155.66ms)         1\n",
      "Solve successfully\n",
      "\n",
      " Time for MPS input                             0.00 seconds\n",
      " Time for solving problem                       0.08 seconds\n",
      " Time for solution output                       0.00 seconds\n",
      " Time for constraint functions                  0.11 seconds\n",
      " Time for objective function                    0.00 seconds\n",
      "Setting the init for x\n",
      "Settiing the init for u\n",
      " ==============================\n",
      "    SNOPT  C interface  2.2.0   \n",
      " ==============================\n",
      " S N O P T  7.7.7    (Feb 2021)\n",
      " ==============================\n",
      "\n",
      " SNMEMB EXIT 100 -- finished successfully\n",
      " SNMEMB INFO 104 -- memory requirements estimated\n",
      "\n",
      " Trial version of SNOPT -- for evaluation or academic purposes only\n",
      "\n",
      "\n",
      "\n",
      " Nonlinear constraints     304     Linear constraints       0\n",
      " Nonlinear variables       254     Linear variables         0\n",
      " Jacobian  variables       254     Objective variables    254\n",
      " Total constraints         304     Total variables        254\n",
      "\n",
      "\n",
      "\n",
      " The user has defined    1304   out of    1304   constraint gradients.\n",
      " The user has defined     254   out of     254   objective  gradients.\n",
      "\n",
      "\n",
      " Major Minors     Step   nCon Feasible  Optimal  MeritFunction     nS Penalty\n",
      "     0     43               1 (4.6E-16)(1.4E-13) 4.5272892E+04                  r\n",
      "\n",
      " SNOPTC EXIT   0 -- finished successfully\n",
      " SNOPTC INFO   1 -- optimality conditions satisfied\n",
      "\n",
      " Problem name                 solver\n",
      " No. of iterations                  43   Objective            4.5272891740E+04\n",
      " No. of major iterations             0   Linear    obj. term  0.0000000000E+00\n",
      " Penalty parameter           0.000E+00   Nonlinear obj. term  4.5272891740E+04\n",
      " User function calls (total)         2\n",
      " No. of degenerate steps            38   Percentage                      88.37\n",
      " Max x                     202 3.8E+01   Max pi                    126 5.5E+03\n",
      " Max Primal infeas         370 1.8E-14   Max Dual infeas           144 7.7E-10\n",
      " Nonlinear constraint violn    1.8E-14\n",
      "\n",
      "\n",
      "\n",
      " Solution printed on file  10\n",
      "      solver  :   t_proc      (avg)   t_wall      (avg)    n_eval\n",
      "   nlp_jac_f  | 175.00us ( 43.75us) 134.08us ( 33.52us)         4\n",
      "   nlp_jac_g  | 149.22ms ( 37.30ms) 149.13ms ( 37.28ms)         4\n",
      "       total  | 153.16ms (153.16ms) 152.98ms (152.98ms)         1\n",
      "Solve successfully\n",
      "\n",
      " Time for MPS input                             0.00 seconds\n",
      " Time for solving problem                       0.08 seconds\n",
      " Time for solution output                       0.00 seconds\n",
      " Time for constraint functions                  0.11 seconds\n",
      " Time for objective function                    0.00 seconds\n",
      "Setting the init for x\n",
      "Settiing the init for u\n",
      " ==============================\n",
      "    SNOPT  C interface  2.2.0   \n",
      " ==============================\n",
      " S N O P T  7.7.7    (Feb 2021)\n",
      " ==============================\n",
      "\n",
      " SNMEMB EXIT 100 -- finished successfully\n",
      " SNMEMB INFO 104 -- memory requirements estimated\n",
      "\n",
      " Trial version of SNOPT -- for evaluation or academic purposes only\n",
      "\n",
      "\n",
      "\n",
      " Nonlinear constraints     304     Linear constraints       0\n",
      " Nonlinear variables       254     Linear variables         0\n",
      " Jacobian  variables       254     Objective variables    254\n",
      " Total constraints         304     Total variables        254\n",
      "\n",
      "\n",
      "\n",
      " The user has defined    1304   out of    1304   constraint gradients.\n",
      " The user has defined     254   out of     254   objective  gradients.\n",
      "\n",
      "\n",
      " Major Minors     Step   nCon Feasible  Optimal  MeritFunction     nS Penalty\n",
      "     0     44               1 (4.6E-16)(1.5E-13) 4.6308730E+04                  r\n",
      "\n",
      " SNOPTC EXIT   0 -- finished successfully\n",
      " SNOPTC INFO   1 -- optimality conditions satisfied\n",
      "\n",
      " Problem name                 solver\n",
      " No. of iterations                  44   Objective            4.6308730025E+04\n",
      " No. of major iterations             0   Linear    obj. term  0.0000000000E+00\n",
      " Penalty parameter           0.000E+00   Nonlinear obj. term  4.6308730025E+04\n",
      " User function calls (total)         2\n",
      " No. of degenerate steps            40   Percentage                      90.91\n",
      " Max x                     202 3.9E+01   Max pi                    122 5.7E+03\n",
      " Max Primal infeas         366 1.8E-14   Max Dual infeas           160 8.4E-10\n",
      " Nonlinear constraint violn    1.8E-14\n",
      "\n",
      "\n",
      "\n",
      " Solution printed on file  10\n",
      "      solver  :   t_proc      (avg)   t_wall      (avg)    n_eval\n",
      "   nlp_jac_f  | 138.00us ( 34.50us) 133.27us ( 33.32us)         4\n",
      "   nlp_jac_g  | 151.38ms ( 37.84ms) 151.26ms ( 37.82ms)         4\n",
      "       total  | 155.28ms (155.28ms) 155.06ms (155.06ms)         1\n",
      "Solve successfully\n",
      "\n",
      " Time for MPS input                             0.00 seconds\n",
      " Time for solving problem                       0.08 seconds\n",
      " Time for solution output                       0.00 seconds\n",
      " Time for constraint functions                  0.12 seconds\n",
      " Time for objective function                    0.00 seconds\n",
      "Setting the init for x\n",
      "Settiing the init for u\n",
      " ==============================\n",
      "    SNOPT  C interface  2.2.0   \n",
      " ==============================\n",
      " S N O P T  7.7.7    (Feb 2021)\n",
      " ==============================\n",
      "\n",
      " SNMEMB EXIT 100 -- finished successfully\n",
      " SNMEMB INFO 104 -- memory requirements estimated\n",
      "\n",
      " Trial version of SNOPT -- for evaluation or academic purposes only\n",
      "\n",
      "\n",
      "\n",
      " Nonlinear constraints     304     Linear constraints       0\n",
      " Nonlinear variables       254     Linear variables         0\n",
      " Jacobian  variables       254     Objective variables    254\n",
      " Total constraints         304     Total variables        254\n",
      "\n",
      "\n",
      "\n",
      " The user has defined    1304   out of    1304   constraint gradients.\n",
      " The user has defined     254   out of     254   objective  gradients.\n",
      "\n",
      "\n",
      " Major Minors     Step   nCon Feasible  Optimal  MeritFunction     nS Penalty\n",
      "     0     43               1 (4.5E-16)(2.1E-13) 4.7355722E+04                  r\n",
      "\n",
      " SNOPTC EXIT   0 -- finished successfully\n",
      " SNOPTC INFO   1 -- optimality conditions satisfied\n",
      "\n",
      " Problem name                 solver\n",
      " No. of iterations                  43   Objective            4.7355721722E+04\n",
      " No. of major iterations             0   Linear    obj. term  0.0000000000E+00\n",
      " Penalty parameter           0.000E+00   Nonlinear obj. term  4.7355721722E+04\n",
      " User function calls (total)         2\n",
      " No. of degenerate steps            38   Percentage                      88.37\n",
      " Max x                     202 3.9E+01   Max pi                    118 5.9E+03\n",
      " Max Primal infeas         362 1.8E-14   Max Dual infeas           152 1.2E-09\n",
      " Nonlinear constraint violn    1.8E-14\n",
      "\n",
      "\n",
      "\n",
      " Solution printed on file  10\n",
      "      solver \n",
      " :   t_proc      (avg)   t_wall      (avg)    n_eval\n",
      "   nlp_jac_f  | 130.00us ( 32.50us) 125.84us ( 31.46us)         4\n",
      "   nlp_jac_g  | 148.76ms ( 37.19ms) 148.55ms ( 37.14ms)         4\n",
      "       total  | 152.64ms (152.64ms) 152.34ms (152.34ms)         1\n",
      "Solve successfully\n",
      " Time for MPS input                             0.00 seconds\n",
      " Time for solving problem                       0.08 seconds\n",
      " Time for solution output                       0.00 seconds\n",
      " Time for constraint functions                  0.11 seconds\n",
      " Time for objective function                    0.00 seconds\n",
      "Setting the init for x\n",
      "Settiing the init for u\n",
      " ==============================\n",
      "    SNOPT  C interface  2.2.0   \n",
      " ==============================\n",
      " S N O P T  7.7.7    (Feb 2021)\n",
      " ==============================\n",
      "\n",
      " SNMEMB EXIT 100 -- finished successfully\n",
      " SNMEMB INFO 104 -- memory requirements estimated\n",
      "\n",
      " Trial version of SNOPT -- for evaluation or academic purposes only\n",
      "\n",
      "\n",
      "\n",
      " Nonlinear constraints     304     Linear constraints       0\n",
      " Nonlinear variables       254     Linear variables         0\n",
      " Jacobian  variables       254     Objective variables    254\n",
      " Total constraints         304     Total variables        254\n",
      "\n",
      "\n",
      "\n",
      " The user has defined    1304   out of    1304   constraint gradients.\n",
      " The user has defined     254   out of     254   objective  gradients.\n",
      "\n",
      "\n",
      " Major Minors     Step   nCon Feasible  Optimal  MeritFunction     nS Penalty\n",
      "     0     43               1 (3.6E-16)(1.4E-13) 4.8412202E+04                  r\n",
      "\n",
      " SNOPTC EXIT   0 -- finished successfully\n",
      " SNOPTC INFO   1 -- optimality conditions satisfied\n",
      "\n",
      " Problem name                 solver\n",
      " No. of iterations                  43   Objective            4.8412201918E+04\n",
      " No. of major iterations             0   Linear    obj. term  0.0000000000E+00\n",
      " Penalty parameter           0.000E+00   Nonlinear obj. term  4.8412201918E+04\n",
      " User function calls (total)         2\n",
      " No. of degenerate steps            38   Percentage                      88.37\n",
      " Max x                     202 3.9E+01   Max pi                    114 6.1E+03\n",
      " Max Primal infeas         362 1.4E-14   Max Dual infeas           144 8.5E-10\n",
      " Nonlinear constraint violn    1.4E-14\n",
      "\n",
      "\n",
      "\n",
      " Solution printed on file  10\n",
      "      solver  :   t_proc      (avg)   t_wall      (avg)    n_eval\n",
      "   nlp_jac_f  | 160.00us ( 40.00us) 130.83us ( 32.71us)         4\n",
      "   nlp_jac_g  | 146.51ms ( 36.63ms) 146.58ms ( 36.65ms)         4\n",
      "       total  | 150.46ms (150.46ms) 150.45ms (150.45ms)         1\n",
      "Solve successfully\n",
      "\n",
      " Time for MPS input                             0.00 seconds\n",
      " Time for solving problem                       0.08 seconds\n",
      " Time for solution output                       0.00 seconds\n",
      " Time for constraint functions                  0.11 seconds\n",
      " Time for objective function                    0.00 seconds\n",
      "Setting the init for x\n",
      "Settiing the init for u\n",
      " ==============================\n",
      "    SNOPT  C interface  2.2.0   \n",
      " ==============================\n",
      " S N O P T  7.7.7    (Feb 2021)\n",
      " ==============================\n",
      "\n",
      " SNMEMB EXIT 100 -- finished successfully\n",
      " SNMEMB INFO 104 -- memory requirements estimated\n",
      "\n",
      " Trial version of SNOPT -- for evaluation or academic purposes only\n",
      "\n",
      "\n",
      "\n",
      " Nonlinear constraints     304     Linear constraints       0\n",
      " Nonlinear variables       254     Linear variables         0\n",
      " Jacobian  variables       254     Objective variables    254\n",
      " Total constraints         304     Total variables        254\n",
      "\n",
      "\n",
      "\n",
      " The user has defined    1304   out of    1304   constraint gradients.\n",
      " The user has defined     254   out of     254   objective  gradients.\n",
      "\n",
      "\n",
      " Major Minors     Step   nCon Feasible  Optimal  MeritFunction     nS Penalty\n",
      "     0     42               1 (3.6E-16)(1.4E-13) 4.9477390E+04                  r\n",
      "\n",
      " SNOPTC EXIT   0 -- finished successfully\n",
      " SNOPTC INFO   1 -- optimality conditions satisfied\n",
      "\n",
      " Problem name                 solver\n",
      " No. of iterations                  42   Objective            4.9477389892E+04\n",
      " No. of major iterations             0   Linear    obj. term  0.0000000000E+00\n",
      " Penalty parameter           0.000E+00   Nonlinear obj. term  4.9477389892E+04\n",
      " User function calls (total)         2\n",
      " No. of degenerate steps            39   Percentage                      92.86\n",
      " Max x                     202 4.0E+01   Max pi                    110 6.3E+03\n",
      " Max Primal infeas         430 1.4E-14   Max Dual infeas           164 9.1E-10\n",
      " Nonlinear constraint violn    1.4E-14\n",
      "\n",
      "\n",
      "\n",
      " Solution printed on file  10\n",
      "      solver  :   t_proc      (avg)   t_wall      (avg)    n_eval\n",
      "   nlp_jac_f  | 153.00us ( 38.25us) 135.40us ( 33.85us)         4\n",
      "   nlp_jac_g  | 147.04ms ( 36.76ms) 146.81ms ( 36.70ms)         4\n",
      "       total  | 150.94ms (150.94ms) 150.61ms (150.61ms)         1\n",
      "Solve successfully\n",
      "\n",
      " Time for MPS input                             0.00 seconds\n",
      " Time for solving problem                       0.07 seconds\n",
      " Time for solution output                       0.00 seconds\n",
      " Time for constraint functions                  0.11 seconds\n",
      " Time for objective function                    0.00 seconds\n",
      "Setting the init for x\n",
      "Settiing the init for u\n",
      " ==============================\n",
      "    SNOPT  C interface  2.2.0   \n",
      " ==============================\n",
      " S N O P T  7.7.7    (Feb 2021)\n",
      " ==============================\n",
      "\n",
      " SNMEMB EXIT 100 -- finished successfully\n",
      " SNMEMB INFO 104 -- memory requirements estimated\n",
      "\n",
      " Trial version of SNOPT -- for evaluation or academic purposes only\n",
      "\n",
      "\n",
      "\n",
      " Nonlinear constraints     304     Linear constraints       0\n",
      " Nonlinear variables       254     Linear variables         0\n",
      " Jacobian  variables       254     Objective variables    254\n",
      " Total constraints         304     Total variables        254\n",
      "\n",
      "\n",
      "\n",
      " The user has defined    1304   out of    1304   constraint gradients.\n",
      " The user has defined     254   out of     254   objective  gradients.\n",
      "\n",
      "\n",
      " Major Minors     Step   nCon Feasible  Optimal  MeritFunction     nS Penalty\n",
      "     0     42               1 (4.0E-16)(1.4E-13) 5.0551890E+04                  r\n",
      "\n",
      " SNOPTC EXIT   0 -- finished successfully\n",
      " SNOPTC INFO   1 -- optimality conditions satisfied\n",
      "\n",
      " Problem name                 solver\n",
      " No. of iterations                  42   Objective            5.0551890118E+04\n",
      " No. of major iterations             0   Linear    obj. term  0.0000000000E+00\n",
      " Penalty parameter           0.000E+00   Nonlinear obj. term  5.0551890118E+04\n",
      " User function calls (total)         2\n",
      " No. of degenerate steps            38   Percentage                      90.48\n",
      " Max x                     202 4.0E+01   Max pi                    106 6.5E+03\n",
      " Max Primal infeas         257 1.6E-14   Max Dual infeas           136 9.4E-10\n",
      " Nonlinear constraint violn    1.6E-14\n",
      "\n",
      "\n",
      "\n",
      " Solution printed on file  10\n",
      "      solver  :   t_proc      (avg)   t_wall      (avg)    n_eval\n",
      "   nlp_jac_f  | 139.00us ( 34.75us) 131.13us ( 32.78us)         4\n",
      "   nlp_jac_g  | 148.00ms ( 37.00ms) 146.15ms ( 36.54ms)         4\n",
      "       total  | 152.27ms (152.27ms) 150.34ms (150.34ms)         1\n",
      "Solve successfully\n",
      "\n",
      " Time for MPS input                             0.00 seconds\n",
      " Time for solving problem                       0.07 seconds\n",
      " Time for solution output                       0.00 seconds\n",
      " Time for constraint functions                  0.11 seconds\n",
      " Time for objective function                    0.00 seconds\n"
     ]
    },
    {
     "data": {
      "text/html": [
       "<table class=\"show_videos\" style=\"border-spacing:0px;\"><tr><td style=\"padding:1px;\"><video controls width=\"320\" height=\"240\" style=\"object-fit:cover;\" loop autoplay muted>\n",
       "      <source src=\"data:video/mp4;base64,AAAAIGZ0eXBpc29tAAACAGlzb21pc28yYXZjMW1wNDEAAAAIZnJlZQAAOJ9tZGF0AAACfwYF//973EXpvebZSLeWLNgg2SPu73gyNjQgLSBjb3JlIDE2MyByMzA2MCA1ZGI2YWE2IC0gSC4yNjQvTVBFRy00IEFWQyBjb2RlYyAtIENvcHlsZWZ0IDIwMDMtMjAyMSAtIGh0dHA6Ly93d3cudmlkZW9sYW4ub3JnL3gyNjQuaHRtbCAtIG9wdGlvbnM6IGNhYmFjPTEgcmVmPTMgZGVibG9jaz0xOjA6MCBhbmFseXNlPTB4MzoweDExMyBtZT1oZXggc3VibWU9NyBwc3k9MSBwc3lfcmQ9MS4wMDowLjAwIG1peGVkX3JlZj0xIG1lX3JhbmdlPTE2IGNocm9tYV9tZT0xIHRyZWxsaXM9MSA4eDhkY3Q9MSBjcW09MCBkZWFkem9uZT0yMSwxMSBmYXN0X3Bza2lwPTEgY2hyb21hX3FwX29mZnNldD0tMiB0aHJlYWRzPTcgbG9va2FoZWFkX3RocmVhZHM9MSBzbGljZWRfdGhyZWFkcz0wIG5yPTAgZGVjaW1hdGU9MSBpbnRlcmxhY2VkPTAgYmx1cmF5X2NvbXBhdD0wIGNvbnN0cmFpbmVkX2ludHJhPTAgYmZyYW1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Acc3RzYwAAAAAAAAABAAAAAQAAAGQAAAABAAABpHN0c3oAAAAAAAAAAAAAAGQAAAS5AAAAkAAAAEAAAAA4AAAA0gAAAFIAAABbAAABMQAAAIcAAAFxAAAAqAAAAS8AAAFEAAAAwgAAAQIAAADZAAAA6wAAAUoAAACZAAAAxAAAAM4AAAB7AAAAVwAAAEEAAABOAAAANAAAADAAAAAuAAAAIAAAACMAAAAlAAAAGAAAABkAAAAVAAAAVAAAABgAAAASAAAAFwAAAFwAAABkAAAAfgAAARwAAABmAAABeQAAAIgAAAG6AAAA3QAAAJoAAAFwAAABFgAAATAAAAFyAAAA7AAAANoAAACrAAAAzwAAAIEAAACwAAAA4gAAAS8AAADJAAAAvgAAAYMAAAFFAAAAxAAAAXEAAADLAAAAnQAAANIAAADrAAAAagAAALMAAABiAAAAaQAAABsAAAASAAAAKwAAAA0AAAAUAAAADgAAAA0AAAANAAAAFAAAAA4AAAANAAAADQAAABQAAAAOAAAADQAAAA0AAAAUAAAADgAAAA0AAAANAAAAFAAAAA4AAAANAAAADQAAABUAAAANAAAAFHN0Y28AAAAAAAAAAQAAADAAAABidWR0YQAAAFptZXRhAAAAAAAAACFoZGxyAAAAAAAAAABtZGlyYXBwbAAAAAAAAAAAAAAAAC1pbHN0AAAAJal0b28AAAAdZGF0YQAAAAEAAAAATGF2ZjU4Ljc2LjEwMA==\" type=\"video/mp4\"/>\n",
       "      This browser does not support the video tag.\n",
       "      </video></td></tr></table>"
      ],
      "text/plain": [
       "<IPython.core.display.HTML object>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "T = 50\n",
    "\n",
    "x0 = np.array([0, np.pi, 0, 0])\n",
    "initial_guess = {\"x\": np.swapaxes(np.linspace(x0, x_target, T+1), 0, 1)}\n",
    "\n",
    "# obtain the first result\n",
    "res = solve_mpc_sub_loop(x0=x0, cost_fn=cost_fn, init_guess=initial_guess, T=50, solver=\"snopt\")\n",
    "\n",
    "frames = []\n",
    "# mpc loop\n",
    "for i in range(100):\n",
    "    # execute the first control at solution\n",
    "    x0 = mujoco_dyanmics(x0, res[\"u\"][0]).full().flatten()\n",
    "\n",
    "    # update initial guess\n",
    "    initial_guess = update_init_guess(res)\n",
    "    # solving sub-prob for new initial condition\n",
    "    res = solve_mpc_sub_loop(x0=x0, cost_fn=cost_fn, init_guess=initial_guess, T=50, solver=\"snopt\", max_iter=2)\n",
    "\n",
    "    # visualization\n",
    "    data.qpos = x0[:2]\n",
    "    data.qvel = x0[2:]\n",
    "    mujoco.mj_forward(model, data)\n",
    "    renderer.update_scene(data)\n",
    "    pixels = renderer.render()\n",
    "    frames.append(pixels)\n",
    "\n",
    "media.show_video(frames, fps=1/0.02)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### MPC IPOPT with zero initial guess for first iter"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "      solver  :   t_proc      (avg)   t_wall      (avg)    n_eval\n",
      "       nlp_f  | 694.00us ( 11.02us) 691.55us ( 10.98us)        63\n",
      "       nlp_g  | 109.48ms (  1.74ms) 109.30ms (  1.73ms)        63\n",
      "  nlp_grad_f  | 272.00us ( 22.67us) 272.04us ( 22.67us)        12\n",
      "  nlp_hess_l  |   7.48 s (748.47ms)   7.49 s (749.10ms)        10\n",
      "   nlp_jac_g  | 425.79ms ( 35.48ms) 419.73ms ( 34.98ms)        12\n",
      "       total  |   8.04 s (  8.04 s)   8.04 s (  8.04 s)         1\n",
      "{'iter_count': 10, 'iterations': {'alpha_du': [0.0, 0.1963517338669116, 0.3293432841705036, 0.31653691580583876, 0.2863947222746829, 0.24429999229372937, 0.19730048454099178, 0.16569926787165273, 0.13956759145089342, 0.11988821150823215, 0.10188405492206452], 'alpha_pr': [0.0, 0.12146328314123404, 0.04311648879999081, 0.03183474883023792, 0.03198674167341317, 0.027164822568032647, 0.01072322226814846, 0.009236040441646911, 0.007806486617809978, 0.00666771971908206, 0.005652154006847556], 'd_norm': [0.0, 12.225916972154328, 12.070117631179944, 16.133565649022984, 20.95625500549862, 27.2597689530129, 35.09142006176944, 42.036537676724066, 49.39206749569039, 56.91008983481158, 64.41210277288542], 'inf_du': [0.0, 0.6205227699143635, 2.426613723067656, 5.587634064260771, 9.842928621456686, 15.77936827906278, 24.57530195603995, 35.54814400694114, 49.0317203262413, 65.54694588936182, 85.14456812107413], 'inf_pr': [3.141592653589793, 2.7600044955923955, 2.6410027926702613, 2.556927132105647, 2.4751393644532422, 2.407902642786717, 2.382082167548053, 2.3600811603132534, 2.341657218318322, 2.3260437043084106, 2.312896547065001], 'mu': [0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1], 'obj': [0.0, 2.2843877893421247, 4.244886127210961, 6.478461898365335, 9.743016876613877, 13.71193840452415, 15.77593792261494, 17.904365501277066, 20.023436134341697, 22.12484070187834, 24.168549775290423], 'regularization_size': [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0]}, 'n_call_callback_fun': 0, 'n_call_nlp_f': 63, 'n_call_nlp_g': 63, 'n_call_nlp_grad': 0, 'n_call_nlp_grad_f': 12, 'n_call_nlp_hess_l': 10, 'n_call_nlp_jac_g': 12, 'n_call_total': 1, 'return_status': 'Maximum_Iterations_Exceeded', 'success': False, 't_proc_callback_fun': 0.0, 't_proc_nlp_f': 0.0006940000000000002, 't_proc_nlp_g': 0.10948400000000003, 't_proc_nlp_grad': 0.0, 't_proc_nlp_grad_f': 0.00027200000000000005, 't_proc_nlp_hess_l': 7.484748, 't_proc_nlp_jac_g': 0.425788, 't_proc_total': 8.039718, 't_wall_callback_fun': 0.0, 't_wall_nlp_f': 0.0006915489999999997, 't_wall_nlp_g': 0.109301967, 't_wall_nlp_grad': 0.0, 't_wall_nlp_grad_f': 0.00027204000000000003, 't_wall_nlp_hess_l': 7.491039518999999, 't_wall_nlp_jac_g': 0.4197299299999999, 't_wall_total': 8.039510472, 'unified_return_status': 'SOLVER_RET_LIMITED'}\n",
      "Solver fails under iter 10 return last iteration results!\n",
      "Setting the init for x\n",
      "Settiing the init for u\n",
      "      solver  :   t_proc      (avg)   t_wall      (avg)    n_eval\n",
      "       nlp_f  | 126.00us ( 12.60us) 120.42us ( 12.04us)        10\n",
      "       nlp_g  |  17.97ms (  1.80ms)  17.98ms (  1.80ms)        10\n",
      "  nlp_grad_f  | 102.00us ( 25.50us) 102.13us ( 25.53us)         4\n",
      "  nlp_hess_l  |   1.52 s (759.76ms)   1.52 s (760.26ms)         2\n",
      "   nlp_jac_g  | 147.78ms ( 36.94ms) 147.87ms ( 36.97ms)         4\n",
      "       total  |   1.69 s (  1.69 s)   1.69 s (  1.69 s)         1\n",
      "{'iter_count': 2, 'iterations': {'alpha_du': [0.0, 0.28539946462306265, 0.2672292740637352], 'alpha_pr': [0.0, 0.03175082913587509, 0.01224902439191527], 'd_norm': [0.0, 19.022278821741235, 33.33124378264504], 'inf_du': [0.18012528497804844, 3.609060884928156, 15.626990219327226], 'inf_pr': [2.3340004937457115, 2.2598940428657435, 2.232212545611537], 'mu': [0.1, 0.1, 0.1], 'obj': [23.898999950577053, 28.92386722113607, 32.35106060483709], 'regularization_size': [0.0, 0.0, 0.0]}, 'n_call_callback_fun': 0, 'n_call_nlp_f': 10, 'n_call_nlp_g': 10, 'n_call_nlp_grad': 0, 'n_call_nlp_grad_f': 4, 'n_call_nlp_hess_l': 2, 'n_call_nlp_jac_g': 4, 'n_call_total': 1, 'return_status': 'Maximum_Iterations_Exceeded', 'success': False, 't_proc_callback_fun': 0.0, 't_proc_nlp_f': 0.000126, 't_proc_nlp_g': 0.017967, 't_proc_nlp_grad': 0.0, 't_proc_nlp_grad_f': 0.00010199999999999999, 't_proc_nlp_hess_l': 1.5195150000000002, 't_proc_nlp_jac_g': 0.147778, 't_proc_total': 1.690385, 't_wall_callback_fun': 0.0, 't_wall_nlp_f': 0.00012042000000000002, 't_wall_nlp_g': 0.017981475, 't_wall_nlp_grad': 0.0, 't_wall_nlp_grad_f': 0.00010213, 't_wall_nlp_hess_l': 1.5205231590000001, 't_wall_nlp_jac_g': 0.147871387, 't_wall_total': 1.691421707, 'unified_return_status': 'SOLVER_RET_LIMITED'}\n",
      "Solver fails under iter 2 return last iteration results!\n",
      "Setting the init for x\n",
      "Settiing the init for u\n",
      "      solver  :   t_proc      (avg)   t_wall      (avg)    n_eval\n",
      "       nlp_f  | 103.00us ( 12.88us)  96.03us ( 12.00us)         8\n",
      "       nlp_g  |  14.37ms (  1.80ms)  14.38ms (  1.80ms)         8\n",
      "  nlp_grad_f  |  98.00us ( 24.50us)  97.76us ( 24.44us)         4\n",
      "  nlp_hess_l  |   1.55 s (774.75ms)   1.55 s (774.81ms)         2\n",
      "   nlp_jac_g  | 146.65ms ( 36.66ms) 146.68ms ( 36.67ms)         4\n",
      "       total  |   1.72 s (  1.72 s)   1.72 s (  1.72 s)         1\n",
      "{'iter_count': 2, 'iterations': {'alpha_du': [0.0, 0.2859572040991158, 0.15888401836042815], 'alpha_pr': [0.0, 0.038032822661380576, 0.007329266860586433], 'd_norm': [0.0, 25.927071743084706, 61.20423154366929], 'inf_du': [0.19600119618265488, 6.1197987443187625, 25.364205316104012], 'inf_pr': [2.2746176427820632, 2.1881075133516856, 2.172070289466677], 'mu': [0.1, 0.1, 0.1], 'obj': [32.10611654490202, 41.37963388025816, 45.39484152877298], 'regularization_size': [0.0, 0.0, 0.0]}, 'n_call_callback_fun': 0, 'n_call_nlp_f': 8, 'n_call_nlp_g': 8, 'n_call_nlp_grad': 0, 'n_call_nlp_grad_f': 4, 'n_call_nlp_hess_l': 2, 'n_call_nlp_jac_g': 4, 'n_call_total': 1, 'return_status': 'Maximum_Iterations_Exceeded', 'success': False, 't_proc_callback_fun': 0.0, 't_proc_nlp_f': 0.000103, 't_proc_nlp_g': 0.014374, 't_proc_nlp_grad': 0.0, 't_proc_nlp_grad_f': 9.8e-05, 't_proc_nlp_hess_l': 1.5494919999999999, 't_proc_nlp_jac_g': 0.146648, 't_proc_total': 1.715284, 't_wall_callback_fun': 0.0, 't_wall_nlp_f': 9.602599999999999e-05, 't_wall_nlp_g': 0.014376283, 't_wall_nlp_grad': 0.0, 't_wall_nlp_grad_f': 9.776e-05, 't_wall_nlp_hess_l': 1.549627364, 't_wall_nlp_jac_g': 0.146680521, 't_wall_total': 1.715389769, 'unified_return_status': 'SOLVER_RET_LIMITED'}\n",
      "Solver fails under iter 2 return last iteration results!\n",
      "Setting the init for x\n",
      "Settiing the init for u\n",
      "      solver  :   t_proc      (avg)   t_wall      (avg)    n_eval\n",
      "       nlp_f  | 126.00us ( 14.00us) 120.63us ( 13.40us)         9\n",
      "       nlp_g  |  16.93ms (  1.88ms)  16.95ms (  1.88ms)         9\n",
      "  nlp_grad_f  | 110.00us ( 27.50us) 111.22us ( 27.80us)         4\n",
      "  nlp_hess_l  |   1.56 s (780.26ms)   1.56 s (780.28ms)         2\n",
      "   nlp_jac_g  | 149.57ms ( 37.39ms) 149.63ms ( 37.41ms)         4\n",
      "       total  |   1.73 s (  1.73 s)   1.73 s (  1.73 s)         1\n",
      "{'iter_count': 2, 'iterations': {'alpha_du': [0.0, 0.23452730133148764, 0.10172782186509371], 'alpha_pr': [0.0, 0.015927428561832557, 0.002810446173378016], 'd_norm': [0.0, 43.32709044823069, 96.26199656463568], 'inf_du': [0.2266151251716154, 13.517601580929266, 42.632295706543594], 'inf_pr': [3.1733920511798845, 3.1228480759860298, 3.1140714795608337], 'mu': [0.1, 0.1, 0.1], 'obj': [45.31224381457693, 52.284153763428215, 54.74667492068164], 'regularization_size': [0.0, 0.0, 0.0]}, 'n_call_callback_fun': 0, 'n_call_nlp_f': 9, 'n_call_nlp_g': 9, 'n_call_nlp_grad': 0, 'n_call_nlp_grad_f': 4, 'n_call_nlp_hess_l': 2, 'n_call_nlp_jac_g': 4, 'n_call_total': 1, 'return_status': 'Maximum_Iterations_Exceeded', 'success': False, 't_proc_callback_fun': 0.0, 't_proc_nlp_f': 0.000126, 't_proc_nlp_g': 0.016932000000000003, 't_proc_nlp_grad': 0.0, 't_proc_nlp_grad_f': 0.00010999999999999999, 't_proc_nlp_hess_l': 1.5605259999999999, 't_proc_nlp_jac_g': 0.14957499999999999, 't_proc_total': 1.73205, 't_wall_callback_fun': 0.0, 't_wall_nlp_f': 0.00012063199999999999, 't_wall_nlp_g': 0.016946516000000002, 't_wall_nlp_grad': 0.0, 't_wall_nlp_grad_f': 0.00011122, 't_wall_nlp_hess_l': 1.560564146, 't_wall_nlp_jac_g': 0.149630263, 't_wall_total': 1.732080801, 'unified_return_status': 'SOLVER_RET_LIMITED'}\n",
      "Solver fails under iter 2 return last iteration results!\n",
      "Setting the init for x\n",
      "Settiing the init for u\n",
      "      solver  :   t_proc      (avg)   t_wall      (avg)    n_eval\n",
      "       nlp_f  | 114.00us ( 12.67us) 109.27us ( 12.14us)         9\n",
      "       nlp_g  |  17.34ms (  1.93ms)  17.35ms (  1.93ms)         9\n",
      "  nlp_grad_f  | 105.00us ( 26.25us) 104.70us ( 26.18us)         4\n",
      "  nlp_hess_l  |   1.58 s (791.55ms)   1.58 s (791.60ms)         2\n",
      "   nlp_jac_g  | 156.03ms ( 39.01ms) 156.13ms ( 39.03ms)         4\n",
      "       total  |   1.76 s (  1.76 s)   1.76 s (  1.76 s)         1\n",
      "{'iter_count': 2, 'iterations': {'alpha_du': [0.0, 0.1934830039885952, 0.07532837920414537], 'alpha_pr': [0.0, 0.009693122580641622, 0.0022515971698108214], 'd_norm': [0.0, 59.2848011083364, 127.69619118105044], 'inf_du': [0.2551887506500808, 19.020857687811162, 49.10588020887219], 'inf_pr': [4.133546249315198, 4.093479278827834, 4.084262412468946], 'mu': [0.1, 0.1, 0.1], 'obj': [54.90976311299164, 60.982258557775474, 63.69202796657209], 'regularization_size': [0.0, 0.0, 0.0]}, 'n_call_callback_fun': 0, 'n_call_nlp_f': 9, 'n_call_nlp_g': 9, 'n_call_nlp_grad': 0, 'n_call_nlp_grad_f': 4, 'n_call_nlp_hess_l': 2, 'n_call_nlp_jac_g': 4, 'n_call_total': 1, 'return_status': 'Maximum_Iterations_Exceeded', 'success': False, 't_proc_callback_fun': 0.0, 't_proc_nlp_f': 0.000114, 't_proc_nlp_g': 0.017339999999999998, 't_proc_nlp_grad': 0.0, 't_proc_nlp_grad_f': 0.000105, 't_proc_nlp_hess_l': 1.5830980000000001, 't_proc_nlp_jac_g': 0.156029, 't_proc_total': 1.761398, 't_wall_callback_fun': 0.0, 't_wall_nlp_f': 0.000109272, 't_wall_nlp_g': 0.017354977999999997, 't_wall_nlp_grad': 0.0, 't_wall_nlp_grad_f': 0.00010470100000000001, 't_wall_nlp_hess_l': 1.583204185, 't_wall_nlp_jac_g': 0.156128965, 't_wall_total': 1.761531679, 'unified_return_status': 'SOLVER_RET_LIMITED'}\n",
      "Solver fails under iter 2 return last iteration results!\n",
      "Setting the init for x\n",
      "Settiing the init for u\n",
      "      solver  :   t_proc      (avg)   t_wall      (avg)    n_eval\n",
      "       nlp_f  | 147.00us ( 16.33us) 140.35us ( 15.59us)         9\n",
      "       nlp_g  |  18.29ms (  2.03ms)  18.32ms (  2.04ms)         9\n",
      "  nlp_grad_f  | 109.00us ( 27.25us) 110.19us ( 27.55us)         4\n",
      "  nlp_hess_l  |   1.69 s (846.68ms)   1.69 s (846.80ms)         2\n",
      "   nlp_jac_g  | 157.79ms ( 39.45ms) 157.85ms ( 39.46ms)         4\n",
      "       total  |   1.87 s (  1.87 s)   1.88 s (  1.88 s)         1\n",
      "{'iter_count': 2, 'iterations': {'alpha_du': [0.0, 0.16140936549240822, 0.057814126130638764], 'alpha_pr': [0.0, 0.006533173236437589, 0.0018644198712228033], 'd_norm': [0.0, 75.28527426736399, 160.15166691635912], 'inf_du': [0.2873448703446069, 23.63968450615272, 51.252860139200905], 'inf_pr': [4.970761082282591, 4.938286239015096, 4.929079200021291], 'mu': [0.1, 0.1, 0.1], 'obj': [64.1558489309578, 69.57089947781286, 72.50166822013156], 'regularization_size': [0.0, 0.0, 0.0]}, 'n_call_callback_fun': 0, 'n_call_nlp_f': 9, 'n_call_nlp_g': 9, 'n_call_nlp_grad': 0, 'n_call_nlp_grad_f': 4, 'n_call_nlp_hess_l': 2, 'n_call_nlp_jac_g': 4, 'n_call_total': 1, 'return_status': 'Maximum_Iterations_Exceeded', 'success': False, 't_proc_callback_fun': 0.0, 't_proc_nlp_f': 0.000147, 't_proc_nlp_g': 0.018289, 't_proc_nlp_grad': 0.0, 't_proc_nlp_grad_f': 0.00010899999999999999, 't_proc_nlp_hess_l': 1.693355, 't_proc_nlp_jac_g': 0.157793, 't_proc_total': 1.874837, 't_wall_callback_fun': 0.0, 't_wall_nlp_f': 0.000140354, 't_wall_nlp_g': 0.018318035000000003, 't_wall_nlp_grad': 0.0, 't_wall_nlp_grad_f': 0.00011019, 't_wall_nlp_hess_l': 1.693606794, 't_wall_nlp_jac_g': 0.157850355, 't_wall_total': 1.875068966, 'unified_return_status': 'SOLVER_RET_LIMITED'}\n",
      "Solver fails under iter 2 return last iteration results!\n",
      "Setting the init for x\n",
      "Settiing the init for u\n",
      "      solver  :   t_proc      (avg)   t_wall      (avg)    n_eval\n",
      "       nlp_f  | 122.00us ( 13.56us) 116.38us ( 12.93us)         9\n",
      "       nlp_g  |  15.33ms (  1.70ms)  15.38ms (  1.71ms)         9\n",
      "  nlp_grad_f  | 103.00us ( 25.75us) 103.95us ( 25.99us)         4\n",
      "  nlp_hess_l  |   1.63 s (815.02ms)   1.63 s (815.03ms)         2\n",
      "   nlp_jac_g  | 153.65ms ( 38.41ms) 153.73ms ( 38.43ms)         4\n",
      "       total  |   1.80 s (  1.80 s)   1.80 s (  1.80 s)         1\n",
      "{'iter_count': 2, 'iterations': {'alpha_du': [0.0, 0.135219897248557, 0.044183608425910355], 'alpha_pr': [0.0, 0.005189265313697392, 0.0007793878716998412], 'd_norm': [0.0, 93.0153830220776, 198.46573622659224], 'inf_du': [0.31361768519307387, 24.90178495488089, 51.843749745756], 'inf_pr': [5.666563627752777, 5.63715832567142, 5.63276479284154], 'mu': [0.1, 0.1, 0.1], 'obj': [73.31518418850854, 78.85529698231339, 80.42445680538819], 'regularization_size': [0.0, 0.0, 0.0]}, 'n_call_callback_fun': 0, 'n_call_nlp_f': 9, 'n_call_nlp_g': 9, 'n_call_nlp_grad': 0, 'n_call_nlp_grad_f': 4, 'n_call_nlp_hess_l': 2, 'n_call_nlp_jac_g': 4, 'n_call_total': 1, 'return_status': 'Maximum_Iterations_Exceeded', 'success': False, 't_proc_callback_fun': 0.0, 't_proc_nlp_f': 0.000122, 't_proc_nlp_g': 0.015328, 't_proc_nlp_grad': 0.0, 't_proc_nlp_grad_f': 0.000103, 't_proc_nlp_hess_l': 1.630046, 't_proc_nlp_jac_g': 0.153651, 't_proc_total': 1.803767, 't_wall_callback_fun': 0.0, 't_wall_nlp_f': 0.000116381, 't_wall_nlp_g': 0.015375992, 't_wall_nlp_grad': 0.0, 't_wall_nlp_grad_f': 0.000103951, 't_wall_nlp_hess_l': 1.63006454, 't_wall_nlp_jac_g': 0.153733112, 't_wall_total': 1.803824877, 'unified_return_status': 'SOLVER_RET_LIMITED'}\n",
      "Solver fails under iter 2 return last iteration results!\n",
      "Setting the init for x\n",
      "Settiing the init for u\n",
      "      solver  :   t_proc      (avg)   t_wall      (avg)    n_eval\n",
      "       nlp_f  | 145.00us ( 16.11us) 136.14us ( 15.13us)         9\n",
      "       nlp_g  |  16.67ms (  1.85ms)  16.69ms (  1.85ms)         9\n",
      "  nlp_grad_f  | 124.00us ( 31.00us) 122.34us ( 30.59us)         4\n",
      "  nlp_hess_l  |   1.60 s (800.39ms)   1.60 s (800.39ms)         2\n",
      "   nlp_jac_g  | 152.72ms ( 38.18ms) 152.77ms ( 38.19ms)         4\n",
      "       total  |   1.78 s (  1.78 s)   1.78 s (  1.78 s)         1\n",
      "{'iter_count': 2, 'iterations': {'alpha_du': [0.0, 0.11341092008324301, 0.03592386295707804], 'alpha_pr': [0.0, 0.004318155443514892, 0.00068101262441787], 'd_norm': [0.0, 112.51961715096148, 234.92846881676988], 'inf_du': [0.34203851890388154, 25.03747207380296, 50.04676119305862], 'inf_pr': [6.2013473066831555, 6.174568925053674, 6.170363965665375], 'mu': [0.1, 0.1, 0.1], 'obj': [81.59057798303215, 87.34041799716046, 89.03289431766856], 'regularization_size': [0.0, 0.0, 0.0]}, 'n_call_callback_fun': 0, 'n_call_nlp_f': 9, 'n_call_nlp_g': 9, 'n_call_nlp_grad': 0, 'n_call_nlp_grad_f': 4, 'n_call_nlp_hess_l': 2, 'n_call_nlp_jac_g': 4, 'n_call_total': 1, 'return_status': 'Maximum_Iterations_Exceeded', 'success': False, 't_proc_callback_fun': 0.0, 't_proc_nlp_f': 0.00014499999999999997, 't_proc_nlp_g': 0.016669, 't_proc_nlp_grad': 0.0, 't_proc_nlp_grad_f': 0.00012399999999999998, 't_proc_nlp_hess_l': 1.600777, 't_proc_nlp_jac_g': 0.152724, 't_proc_total': 1.775079, 't_wall_callback_fun': 0.0, 't_wall_nlp_f': 0.000136143, 't_wall_nlp_g': 0.016689708, 't_wall_nlp_grad': 0.0, 't_wall_nlp_grad_f': 0.000122344, 't_wall_nlp_hess_l': 1.6007836869999998, 't_wall_nlp_jac_g': 0.152770709, 't_wall_total': 1.775055753, 'unified_return_status': 'SOLVER_RET_LIMITED'}\n",
      "Solver fails under iter 2 return last iteration results!\n",
      "Setting the init for x\n",
      "Settiing the init for u\n",
      "      solver  :   t_proc      (avg)   t_wall      (avg)    n_eval\n",
      "       nlp_f  | 165.00us ( 15.00us) 155.48us ( 14.13us)        11\n",
      "       nlp_g  |  21.06ms (  1.91ms)  21.07ms (  1.92ms)        11\n",
      "  nlp_grad_f  | 121.00us ( 30.25us) 120.15us ( 30.04us)         4\n",
      "  nlp_hess_l  |   1.61 s (805.72ms)   1.61 s (805.67ms)         2\n",
      "   nlp_jac_g  | 152.09ms ( 38.02ms) 152.13ms ( 38.03ms)         4\n",
      "       total  |   1.79 s (  1.79 s)   1.79 s (  1.79 s)         1\n",
      "{'iter_count': 2, 'iterations': {'alpha_du': [0.0, 0.09584030808335345, 0.03308279418077235], 'alpha_pr': [0.0, 0.001822717162469965, 0.0006644726394205736], 'd_norm': [0.0, 135.46207019476637, 254.9163134453788], 'inf_du': [0.37330092929526326, 25.501404439017254, 53.514376349816516], 'inf_pr': [6.564281685377953, 6.552316856490727, 6.547963021214774], 'mu': [0.1, 0.1, 0.1], 'obj': [90.6115785420207, 93.58166006766591, 95.44085098527593], 'regularization_size': [0.0, 0.0, 0.0]}, 'n_call_callback_fun': 0, 'n_call_nlp_f': 11, 'n_call_nlp_g': 11, 'n_call_nlp_grad': 0, 'n_call_nlp_grad_f': 4, 'n_call_nlp_hess_l': 2, 'n_call_nlp_jac_g': 4, 'n_call_total': 1, 'return_status': 'Maximum_Iterations_Exceeded', 'success': False, 't_proc_callback_fun': 0.0, 't_proc_nlp_f': 0.000165, 't_proc_nlp_g': 0.021060000000000002, 't_proc_nlp_grad': 0.0, 't_proc_nlp_grad_f': 0.000121, 't_proc_nlp_hess_l': 1.611435, 't_proc_nlp_jac_g': 0.152087, 't_proc_total': 1.789884, 't_wall_callback_fun': 0.0, 't_wall_nlp_f': 0.000155477, 't_wall_nlp_g': 0.021072484, 't_wall_nlp_grad': 0.0, 't_wall_nlp_grad_f': 0.000120147, 't_wall_nlp_hess_l': 1.611337636, 't_wall_nlp_jac_g': 0.152132618, 't_wall_total': 1.789758185, 'unified_return_status': 'SOLVER_RET_LIMITED'}\n",
      "Solver fails under iter 2 return last iteration results!\n",
      "Setting the init for x\n",
      "Settiing the init for u\n",
      "      solver  :   t_proc      (avg)   t_wall      (avg)    n_eval\n",
      "       nlp_f  | 143.00us ( 13.00us) 135.83us ( 12.35us)        11\n",
      "       nlp_g  |  19.97ms (  1.82ms)  19.99ms (  1.82ms)        11\n",
      "  nlp_grad_f  | 110.00us ( 27.50us) 110.84us ( 27.71us)         4\n",
      "  nlp_hess_l  |   1.61 s (805.91ms)   1.61 s (805.91ms)         2\n",
      "   nlp_jac_g  | 151.42ms ( 37.86ms) 151.46ms ( 37.86ms)         4\n",
      "       total  |   1.79 s (  1.79 s)   1.79 s (  1.79 s)         1\n",
      "{'iter_count': 2, 'iterations': {'alpha_du': [0.0, 0.09257170085010341, 0.03173214363210408], 'alpha_pr': [0.0, 0.0017367831134239508, 0.0006412245625685912], 'd_norm': [0.0, 142.99783870423403, 271.72267650477204], 'inf_du': [0.41073345188751176, 25.83715931417806, 53.930577780521354], 'inf_pr': [6.769148025943153, 6.757391483959427, 6.753058478561021], 'mu': [0.1, 0.1, 0.1], 'obj': [97.39710768474522, 100.47382207938244, 102.46214765015604], 'regularization_size': [0.0, 0.0, 0.0]}, 'n_call_callback_fun': 0, 'n_call_nlp_f': 11, 'n_call_nlp_g': 11, 'n_call_nlp_grad': 0, 'n_call_nlp_grad_f': 4, 'n_call_nlp_hess_l': 2, 'n_call_nlp_jac_g': 4, 'n_call_total': 1, 'return_status': 'Maximum_Iterations_Exceeded', 'success': False, 't_proc_callback_fun': 0.0, 't_proc_nlp_f': 0.000143, 't_proc_nlp_g': 0.019971000000000003, 't_proc_nlp_grad': 0.0, 't_proc_nlp_grad_f': 0.00011, 't_proc_nlp_hess_l': 1.6118139999999999, 't_proc_nlp_jac_g': 0.151422, 't_proc_total': 1.788289, 't_wall_callback_fun': 0.0, 't_wall_nlp_f': 0.00013583099999999997, 't_wall_nlp_g': 0.019990039, 't_wall_nlp_grad': 0.0, 't_wall_nlp_grad_f': 0.00011084300000000001, 't_wall_nlp_hess_l': 1.611825563, 't_wall_nlp_jac_g': 0.151458178, 't_wall_total': 1.78826947, 'unified_return_status': 'SOLVER_RET_LIMITED'}\n",
      "Solver fails under iter 2 return last iteration results!\n",
      "Setting the init for x\n",
      "Settiing the init for u\n",
      "      solver  :   t_proc      (avg)   t_wall      (avg)    n_eval\n",
      "       nlp_f  | 127.00us ( 11.55us) 123.98us ( 11.27us)        11\n",
      "       nlp_g  |  19.71ms (  1.79ms)  19.73ms (  1.79ms)        11\n",
      "  nlp_grad_f  |  99.00us ( 24.75us)  99.19us ( 24.80us)         4\n",
      "  nlp_hess_l  |   1.53 s (766.03ms)   1.53 s (766.02ms)         2\n",
      "   nlp_jac_g  | 143.28ms ( 35.82ms) 143.30ms ( 35.83ms)         4\n",
      "       total  |   1.70 s (  1.70 s)   1.70 s (  1.70 s)         1\n",
      "{'iter_count': 2, 'iterations': {'alpha_du': [0.0, 0.08940903165212431, 0.03089728558757408], 'alpha_pr': [0.0, 0.001663765433054433, 0.0006212577766761568], 'd_norm': [0.0, 150.39983752759287, 287.9979949037564], 'inf_du': [0.4517732739114948, 26.032656465667383, 54.37085925964858], 'inf_pr': [6.818690751360347, 6.807346049389547, 6.803116932717837], 'mu': [0.1, 0.1, 0.1], 'obj': [104.84439811317264, 108.0383884585491, 110.1667674442395], 'regularization_size': [0.0, 0.0, 0.0]}, 'n_call_callback_fun': 0, 'n_call_nlp_f': 11, 'n_call_nlp_g': 11, 'n_call_nlp_grad': 0, 'n_call_nlp_grad_f': 4, 'n_call_nlp_hess_l': 2, 'n_call_nlp_jac_g': 4, 'n_call_total': 1, 'return_status': 'Maximum_Iterations_Exceeded', 'success': False, 't_proc_callback_fun': 0.0, 't_proc_nlp_f': 0.000127, 't_proc_nlp_g': 0.019707, 't_proc_nlp_grad': 0.0, 't_proc_nlp_grad_f': 9.900000000000001e-05, 't_proc_nlp_hess_l': 1.532066, 't_proc_nlp_jac_g': 0.143275, 't_proc_total': 1.699795, 't_wall_callback_fun': 0.0, 't_wall_nlp_f': 0.000123981, 't_wall_nlp_g': 0.019731134999999997, 't_wall_nlp_grad': 0.0, 't_wall_nlp_grad_f': 9.919099999999999e-05, 't_wall_nlp_hess_l': 1.53203848, 't_wall_nlp_jac_g': 0.143302694, 't_wall_total': 1.699746607, 'unified_return_status': 'SOLVER_RET_LIMITED'}\n",
      "Solver fails under iter 2 return last iteration results!\n",
      "Setting the init for x\n",
      "Settiing the init for u\n",
      "      solver  :   t_proc      (avg)   t_wall      (avg)    n_eval\n",
      "       nlp_f  | 133.00us ( 12.09us) 125.87us ( 11.44us)        11\n",
      "       nlp_g  |  19.24ms (  1.75ms)  19.25ms (  1.75ms)        11\n",
      "  nlp_grad_f  | 101.00us ( 25.25us)  99.93us ( 24.98us)         4\n",
      "  nlp_hess_l  |   1.52 s (758.96ms)   1.52 s (759.03ms)         2\n",
      "   nlp_jac_g  | 147.83ms ( 36.96ms) 147.91ms ( 36.98ms)         4\n",
      "       total  |   1.69 s (  1.69 s)   1.69 s (  1.69 s)         1\n",
      "{'iter_count': 2, 'iterations': {'alpha_du': [0.0, 0.08597782313179653, 0.03052210287787044], 'alpha_pr': [0.0, 0.0016031203794044284, 0.0006067375115119988], 'd_norm': [0.0, 157.66913256444784, 303.59301135982435], 'inf_du': [0.4971158322240548, 25.956136890826436, 54.655558583928766], 'inf_pr': [6.727828351836873, 6.717042833096908, 6.712967351243636], 'mu': [0.1, 0.1, 0.1], 'obj': [113.03370631956459, 116.36005387860168, 118.65040571839366], 'regularization_size': [0.0, 0.0, 0.0]}, 'n_call_callback_fun': 0, 'n_call_nlp_f': 11, 'n_call_nlp_g': 11, 'n_call_nlp_grad': 0, 'n_call_nlp_grad_f': 4, 'n_call_nlp_hess_l': 2, 'n_call_nlp_jac_g': 4, 'n_call_total': 1, 'return_status': 'Maximum_Iterations_Exceeded', 'success': False, 't_proc_callback_fun': 0.0, 't_proc_nlp_f': 0.000133, 't_proc_nlp_g': 0.019237999999999998, 't_proc_nlp_grad': 0.0, 't_proc_nlp_grad_f': 0.00010099999999999999, 't_proc_nlp_hess_l': 1.517922, 't_proc_nlp_jac_g': 0.14782800000000001, 't_proc_total': 1.689803, 't_wall_callback_fun': 0.0, 't_wall_nlp_f': 0.00012587100000000003, 't_wall_nlp_g': 0.019251183, 't_wall_nlp_grad': 0.0, 't_wall_nlp_grad_f': 9.992700000000001e-05, 't_wall_nlp_hess_l': 1.518052762, 't_wall_nlp_jac_g': 0.147907352, 't_wall_total': 1.689949885, 'unified_return_status': 'SOLVER_RET_LIMITED'}\n",
      "Solver fails under iter 2 return last iteration results!\n",
      "Setting the init for x\n",
      "Settiing the init for u\n",
      "      solver  :   t_proc      (avg)   t_wall      (avg)    n_eval\n",
      "       nlp_f  | 171.00us ( 15.55us) 163.78us ( 14.89us)        11\n",
      "       nlp_g  |  21.23ms (  1.93ms)  21.27ms (  1.93ms)        11\n",
      "  nlp_grad_f  | 108.00us ( 27.00us) 107.39us ( 26.85us)         4\n",
      "  nlp_hess_l  |   1.55 s (774.28ms)   1.55 s (774.31ms)         2\n",
      "   nlp_jac_g  | 149.96ms ( 37.49ms) 150.01ms ( 37.50ms)         4\n",
      "       total  |   1.73 s (  1.73 s)   1.73 s (  1.73 s)         1\n",
      "{'iter_count': 2, 'iterations': {'alpha_du': [0.0, 0.08237299368189507, 0.030527538834622323], 'alpha_pr': [0.0, 0.0015535839023178997, 0.0005976299703880047], 'd_norm': [0.0, 164.9142893897421, 318.9016072146946], 'inf_du': [0.547155195934294, 25.628958160243858, 54.77128588006342], 'inf_pr': [6.520319422120537, 6.51018955882836, 6.506298874435097], 'mu': [0.1, 0.1, 0.1], 'obj': [122.06612219357643, 125.54476130524695, 128.02760147168627], 'regularization_size': [0.0, 0.0, 0.0]}, 'n_call_callback_fun': 0, 'n_call_nlp_f': 11, 'n_call_nlp_g': 11, 'n_call_nlp_grad': 0, 'n_call_nlp_grad_f': 4, 'n_call_nlp_hess_l': 2, 'n_call_nlp_jac_g': 4, 'n_call_total': 1, 'return_status': 'Maximum_Iterations_Exceeded', 'success': False, 't_proc_callback_fun': 0.0, 't_proc_nlp_f': 0.000171, 't_proc_nlp_g': 0.021225, 't_proc_nlp_grad': 0.0, 't_proc_nlp_grad_f': 0.000108, 't_proc_nlp_hess_l': 1.548567, 't_proc_nlp_jac_g': 0.149964, 't_proc_total': 1.725006, 't_wall_callback_fun': 0.0, 't_wall_nlp_f': 0.000163779, 't_wall_nlp_g': 0.021265762, 't_wall_nlp_grad': 0.0, 't_wall_nlp_grad_f': 0.000107385, 't_wall_nlp_hess_l': 1.548616164, 't_wall_nlp_jac_g': 0.150011546, 't_wall_total': 1.725027089, 'unified_return_status': 'SOLVER_RET_LIMITED'}\n",
      "Solver fails under iter 2 return last iteration results!\n",
      "Setting the init for x\n",
      "Settiing the init for u\n",
      "      solver  :   t_proc      (avg)   t_wall      (avg)    n_eval\n",
      "       nlp_f  | 158.00us ( 15.80us) 153.56us ( 15.36us)        10\n",
      "       nlp_g  |  19.53ms (  1.95ms)  19.56ms (  1.96ms)        10\n",
      "  nlp_grad_f  | 107.00us ( 26.75us) 105.79us ( 26.45us)         4\n",
      "  nlp_hess_l  |   1.60 s (801.22ms)   1.60 s (801.31ms)         2\n",
      "   nlp_jac_g  | 149.24ms ( 37.31ms) 149.30ms ( 37.32ms)         4\n",
      "       total  |   1.78 s (  1.78 s)   1.78 s (  1.78 s)         1\n",
      "{'iter_count': 2, 'iterations': {'alpha_du': [0.0, 0.0794661081261318, 0.0308070594968372], 'alpha_pr': [0.0, 0.0015138097617184785, 0.0011871951988733423], 'd_norm': [0.0, 172.35026774406663, 335.09957845750563], 'inf_du': [0.6013096973503593, 25.343082332169832, 54.367094947762965], 'inf_pr': [6.215028851174932, 6.205620479830661, 6.198253196990976], 'mu': [0.1, 0.1, 0.1], 'obj': [132.0671775883358, 135.7247051550788, 141.22448994515443], 'regularization_size': [0.0, 0.0, 0.0]}, 'n_call_callback_fun': 0, 'n_call_nlp_f': 10, 'n_call_nlp_g': 10, 'n_call_nlp_grad': 0, 'n_call_nlp_grad_f': 4, 'n_call_nlp_hess_l': 2, 'n_call_nlp_jac_g': 4, 'n_call_total': 1, 'return_status': 'Maximum_Iterations_Exceeded', 'success': False, 't_proc_callback_fun': 0.0, 't_proc_nlp_f': 0.000158, 't_proc_nlp_g': 0.019525999999999998, 't_proc_nlp_grad': 0.0, 't_proc_nlp_grad_f': 0.00010699999999999999, 't_proc_nlp_hess_l': 1.602444, 't_proc_nlp_jac_g': 0.149238, 't_proc_total': 1.776432, 't_wall_callback_fun': 0.0, 't_wall_nlp_f': 0.00015356, 't_wall_nlp_g': 0.019561222999999996, 't_wall_nlp_grad': 0.0, 't_wall_nlp_grad_f': 0.000105788, 't_wall_nlp_hess_l': 1.602628857, 't_wall_nlp_jac_g': 0.14929994600000002, 't_wall_total': 1.776630275, 'unified_return_status': 'SOLVER_RET_LIMITED'}\n",
      "Solver fails under iter 2 return last iteration results!\n",
      "Setting the init for x\n",
      "Settiing the init for u\n",
      "      solver  :   t_proc      (avg)   t_wall      (avg)    n_eval\n",
      "       nlp_f  | 134.00us ( 12.18us) 126.88us ( 11.53us)        11\n",
      "       nlp_g  |  19.74ms (  1.79ms)  19.75ms (  1.80ms)        11\n",
      "  nlp_grad_f  | 107.00us ( 26.75us) 106.94us ( 26.73us)         4\n",
      "  nlp_hess_l  |   1.56 s (778.70ms)   1.56 s (778.68ms)         2\n",
      "   nlp_jac_g  | 149.40ms ( 37.35ms) 149.43ms ( 37.36ms)         4\n",
      "       total  |   1.73 s (  1.73 s)   1.73 s (  1.73 s)         1\n",
      "{'iter_count': 2, 'iterations': {'alpha_du': [0.0, 0.0774544724363336, 0.03132103391051588], 'alpha_pr': [0.0, 0.0014251767248632907, 0.0005843900352283853], 'd_norm': [0.0, 186.1351370009381, 369.6481545023012], 'inf_du': [0.6736346345989501, 26.23629830696811, 58.610159128720774], 'inf_pr': [5.820751191062439, 5.812455591943717, 5.809058850815577], 'mu': [0.1, 0.1, 0.1], 'obj': [146.14979245915558, 150.018930976887, 153.19127074455832], 'regularization_size': [0.0, 0.0, 0.0]}, 'n_call_callback_fun': 0, 'n_call_nlp_f': 11, 'n_call_nlp_g': 11, 'n_call_nlp_grad': 0, 'n_call_nlp_grad_f': 4, 'n_call_nlp_hess_l': 2, 'n_call_nlp_jac_g': 4, 'n_call_total': 1, 'return_status': 'Maximum_Iterations_Exceeded', 'success': False, 't_proc_callback_fun': 0.0, 't_proc_nlp_f': 0.000134, 't_proc_nlp_g': 0.019736999999999998, 't_proc_nlp_grad': 0.0, 't_proc_nlp_grad_f': 0.000107, 't_proc_nlp_hess_l': 1.557409, 't_proc_nlp_jac_g': 0.149395, 't_proc_total': 1.731462, 't_wall_callback_fun': 0.0, 't_wall_nlp_f': 0.00012687699999999998, 't_wall_nlp_g': 0.019748406000000003, 't_wall_nlp_grad': 0.0, 't_wall_nlp_grad_f': 0.000106936, 't_wall_nlp_hess_l': 1.557365257, 't_wall_nlp_jac_g': 0.149427393, 't_wall_total': 1.731389287, 'unified_return_status': 'SOLVER_RET_LIMITED'}\n",
      "Solver fails under iter 2 return last iteration results!\n",
      "Setting the init for x\n",
      "Settiing the init for u\n",
      "      solver  :   t_proc      (avg)   t_wall      (avg)    n_eval\n",
      "       nlp_f  | 132.00us ( 12.00us) 127.72us ( 11.61us)        11\n",
      "       nlp_g  |  19.80ms (  1.80ms)  19.81ms (  1.80ms)        11\n",
      "  nlp_grad_f  |  96.00us ( 24.00us)  97.83us ( 24.46us)         4\n",
      "  nlp_hess_l  |   1.53 s (764.48ms)   1.53 s (764.50ms)         2\n",
      "   nlp_jac_g  | 144.01ms ( 36.00ms) 144.03ms ( 36.01ms)         4\n",
      "       total  |   1.70 s (  1.70 s)   1.70 s (  1.70 s)         1\n",
      "{'iter_count': 2, 'iterations': {'alpha_du': [0.0, 0.07632187169051606, 0.03220205987390859], 'alpha_pr': [0.0, 0.001402536540408202, 0.0005917811869377956], 'd_norm': [0.0, 196.05501321752934, 391.7940570025446], 'inf_du': [0.7326486911288429, 26.24609775486646, 59.54130391110884], 'inf_pr': [5.359034015473272, 5.351517774445281, 5.3483508469048004], 'mu': [0.1, 0.1, 0.1], 'obj': [158.96907210287782, 163.11864559537725, 166.72299083964595], 'regularization_size': [0.0, 0.0, 0.0]}, 'n_call_callback_fun': 0, 'n_call_nlp_f': 11, 'n_call_nlp_g': 11, 'n_call_nlp_grad': 0, 'n_call_nlp_grad_f': 4, 'n_call_nlp_hess_l': 2, 'n_call_nlp_jac_g': 4, 'n_call_total': 1, 'return_status': 'Maximum_Iterations_Exceeded', 'success': False, 't_proc_callback_fun': 0.0, 't_proc_nlp_f': 0.00013199999999999998, 't_proc_nlp_g': 0.019798000000000003, 't_proc_nlp_grad': 0.0, 't_proc_nlp_grad_f': 9.6e-05, 't_proc_nlp_hess_l': 1.528959, 't_proc_nlp_jac_g': 0.144006, 't_proc_total': 1.697581, 't_wall_callback_fun': 0.0, 't_wall_nlp_f': 0.00012772399999999999, 't_wall_nlp_g': 0.019811093000000002, 't_wall_nlp_grad': 0.0, 't_wall_nlp_grad_f': 9.783e-05, 't_wall_nlp_hess_l': 1.529007191, 't_wall_nlp_jac_g': 0.144034341, 't_wall_total': 1.697602613, 'unified_return_status': 'SOLVER_RET_LIMITED'}\n",
      "Solver fails under iter 2 return last iteration results!\n",
      "Setting the init for x\n",
      "Settiing the init for u\n",
      "      solver  :   t_proc      (avg)   t_wall      (avg)    n_eval\n",
      "       nlp_f  | 147.00us ( 12.25us) 137.10us ( 11.43us)        12\n",
      "       nlp_g  |  21.25ms (  1.77ms)  21.26ms (  1.77ms)        12\n",
      "  nlp_grad_f  |  99.00us ( 24.75us)  99.29us ( 24.82us)         4\n",
      "  nlp_hess_l  |   1.53 s (764.52ms)   1.53 s (764.52ms)         2\n",
      "   nlp_jac_g  | 145.33ms ( 36.33ms) 145.36ms ( 36.34ms)         4\n",
      "       total  |   1.70 s (  1.70 s)   1.70 s (  1.70 s)         1\n",
      "{'iter_count': 2, 'iterations': {'alpha_du': [0.0, 0.07580667376306083, 0.032755847333539], 'alpha_pr': [0.0, 0.0013859761606514526, 0.00029973546354407105], 'd_norm': [0.0, 207.37556868691362, 413.8834175647979], 'inf_du': [0.813188322102012, 26.357010988384467, 60.628855711611486], 'inf_pr': [4.834966993140223, 4.828265844150194, 4.826818641649283], 'mu': [0.1, 0.1, 0.1], 'obj': [173.4935137481988, 177.9935702879751, 180.0376864387992], 'regularization_size': [0.0, 0.0, 0.0]}, 'n_call_callback_fun': 0, 'n_call_nlp_f': 12, 'n_call_nlp_g': 12, 'n_call_nlp_grad': 0, 'n_call_nlp_grad_f': 4, 'n_call_nlp_hess_l': 2, 'n_call_nlp_jac_g': 4, 'n_call_total': 1, 'return_status': 'Maximum_Iterations_Exceeded', 'success': False, 't_proc_callback_fun': 0.0, 't_proc_nlp_f': 0.00014700000000000002, 't_proc_nlp_g': 0.021248, 't_proc_nlp_grad': 0.0, 't_proc_nlp_grad_f': 9.9e-05, 't_proc_nlp_hess_l': 1.5290460000000001, 't_proc_nlp_jac_g': 0.145331, 't_proc_total': 1.700541, 't_wall_callback_fun': 0.0, 't_wall_nlp_f': 0.000137101, 't_wall_nlp_g': 0.021259517, 't_wall_nlp_grad': 0.0, 't_wall_nlp_grad_f': 9.928600000000001e-05, 't_wall_nlp_hess_l': 1.529041265, 't_wall_nlp_jac_g': 0.14535846900000002, 't_wall_total': 1.700518722, 'unified_return_status': 'SOLVER_RET_LIMITED'}\n",
      "Solver fails under iter 2 return last iteration results!\n",
      "Setting the init for x\n",
      "Settiing the init for u\n",
      "      solver  :   t_proc      (avg)   t_wall      (avg)    n_eval\n",
      "       nlp_f  | 160.00us ( 11.43us) 154.48us ( 11.03us)        14\n",
      "       nlp_g  |  24.92ms (  1.78ms)  24.94ms (  1.78ms)        14\n",
      "  nlp_grad_f  | 100.00us ( 25.00us)  98.63us ( 24.66us)         4\n",
      "  nlp_hess_l  |   1.53 s (763.64ms)   1.53 s (763.61ms)         2\n",
      "   nlp_jac_g  | 143.82ms ( 35.95ms) 143.85ms ( 35.96ms)         4\n",
      "       total  |   1.70 s (  1.70 s)   1.70 s (  1.70 s)         1\n",
      "{'iter_count': 2, 'iterations': {'alpha_du': [0.0, 0.0756616837331863, 0.03186751183394084], 'alpha_pr': [0.0, 0.0013995511612420956, 0.00015126825234686183], 'd_norm': [0.0, 213.83045281354174, 419.13516392012014], 'inf_du': [0.8985147116748966, 26.010480901387627, 58.781788246186636], 'inf_pr': [4.259229427080414, 4.253268417589747, 4.252625033109456], 'mu': [0.1, 0.1, 0.1], 'obj': [187.80830143290837, 192.67726595001903, 193.78700398618344], 'regularization_size': [0.0, 0.0, 0.0]}, 'n_call_callback_fun': 0, 'n_call_nlp_f': 14, 'n_call_nlp_g': 14, 'n_call_nlp_grad': 0, 'n_call_nlp_grad_f': 4, 'n_call_nlp_hess_l': 2, 'n_call_nlp_jac_g': 4, 'n_call_total': 1, 'return_status': 'Maximum_Iterations_Exceeded', 'success': False, 't_proc_callback_fun': 0.0, 't_proc_nlp_f': 0.00016, 't_proc_nlp_g': 0.024918000000000003, 't_proc_nlp_grad': 0.0, 't_proc_nlp_grad_f': 9.999999999999999e-05, 't_proc_nlp_hess_l': 1.527275, 't_proc_nlp_jac_g': 0.14382, 't_proc_total': 1.701139, 't_wall_callback_fun': 0.0, 't_wall_nlp_f': 0.00015448300000000002, 't_wall_nlp_g': 0.024941408, 't_wall_nlp_grad': 0.0, 't_wall_nlp_grad_f': 9.8635e-05, 't_wall_nlp_hess_l': 1.527220557, 't_wall_nlp_jac_g': 0.143848633, 't_wall_total': 1.701060373, 'unified_return_status': 'SOLVER_RET_LIMITED'}\n",
      "Solver fails under iter 2 return last iteration results!\n",
      "Setting the init for x\n",
      "Settiing the init for u\n",
      "      solver  :   t_proc      (avg)   t_wall      (avg)    n_eval\n",
      "       nlp_f  | 162.00us ( 10.80us) 156.82us ( 10.45us)        15\n",
      "       nlp_g  |  26.17ms (  1.74ms)  26.21ms (  1.75ms)        15\n",
      "  nlp_grad_f  |  97.00us ( 24.25us)  96.46us ( 24.12us)         4\n",
      "  nlp_hess_l  |   1.53 s (766.16ms)   1.53 s (766.39ms)         2\n",
      "   nlp_jac_g  | 144.71ms ( 36.18ms) 144.80ms ( 36.20ms)         4\n",
      "       total  |   1.71 s (  1.71 s)   1.71 s (  1.71 s)         1\n",
      "{'iter_count': 2, 'iterations': {'alpha_du': [0.0, 0.07560737965398832, 0.033812216033104456], 'alpha_pr': [0.0, 0.0007126582470642469, 0.00015949808161608758], 'd_norm': [0.0, 213.8732963176591, 393.5135892225476], 'inf_du': [0.997623500655309, 25.7158517657181, 64.36521105334702], 'inf_pr': [3.7415590507991285, 3.738892597884699, 3.7382962516879674], 'mu': [0.1, 0.1, 0.1], 'obj': [202.59432135791292, 205.17765858703854, 206.34350251160964], 'regularization_size': [0.0, 0.0, 0.0]}, 'n_call_callback_fun': 0, 'n_call_nlp_f': 15, 'n_call_nlp_g': 15, 'n_call_nlp_grad': 0, 'n_call_nlp_grad_f': 4, 'n_call_nlp_hess_l': 2, 'n_call_nlp_jac_g': 4, 'n_call_total': 1, 'return_status': 'Maximum_Iterations_Exceeded', 'success': False, 't_proc_callback_fun': 0.0, 't_proc_nlp_f': 0.000162, 't_proc_nlp_g': 0.02617, 't_proc_nlp_grad': 0.0, 't_proc_nlp_grad_f': 9.7e-05, 't_proc_nlp_hess_l': 1.5323280000000001, 't_proc_nlp_jac_g': 0.14470899999999998, 't_proc_total': 1.708258, 't_wall_callback_fun': 0.0, 't_wall_nlp_f': 0.000156822, 't_wall_nlp_g': 0.026213587999999996, 't_wall_nlp_grad': 0.0, 't_wall_nlp_grad_f': 9.6462e-05, 't_wall_nlp_hess_l': 1.5327789219999999, 't_wall_nlp_jac_g': 0.14479817499999997, 't_wall_total': 1.708763046, 'unified_return_status': 'SOLVER_RET_LIMITED'}\n",
      "Solver fails under iter 2 return last iteration results!\n",
      "Setting the init for x\n",
      "Settiing the init for u\n",
      "      solver  :   t_proc      (avg)   t_wall      (avg)    n_eval\n",
      "       nlp_f  | 161.00us ( 10.73us) 156.12us ( 10.41us)        15\n",
      "       nlp_g  |  26.15ms (  1.74ms)  26.17ms (  1.74ms)        15\n",
      "  nlp_grad_f  |  93.00us ( 23.25us)  91.98us ( 22.99us)         4\n",
      "  nlp_hess_l  |   1.50 s (749.49ms)   1.50 s (749.93ms)         2\n",
      "   nlp_jac_g  | 139.51ms ( 34.88ms) 139.65ms ( 34.91ms)         4\n",
      "       total  |   1.67 s (  1.67 s)   1.67 s (  1.67 s)         1\n",
      "{'iter_count': 2, 'iterations': {'alpha_du': [0.0, 0.080246420325525, 0.03633166930028415], 'alpha_pr': [0.0, 0.000740849261895511, 0.000167286974974421], 'd_norm': [0.0, 196.26102190980524, 360.70832896180286], 'inf_du': [1.1248115235180112, 26.256056619483648, 59.6519585566675], 'inf_pr': [3.798084253078045, 3.795270445162535, 3.794635545850554], 'mu': [0.1, 0.1, 0.1], 'obj': [216.1415451368153, 218.7192607749006, 219.91680085887944], 'regularization_size': [0.0, 0.0, 0.0]}, 'n_call_callback_fun': 0, 'n_call_nlp_f': 15, 'n_call_nlp_g': 15, 'n_call_nlp_grad': 0, 'n_call_nlp_grad_f': 4, 'n_call_nlp_hess_l': 2, 'n_call_nlp_jac_g': 4, 'n_call_total': 1, 'return_status': 'Maximum_Iterations_Exceeded', 'success': False, 't_proc_callback_fun': 0.0, 't_proc_nlp_f': 0.000161, 't_proc_nlp_g': 0.026147999999999998, 't_proc_nlp_grad': 0.0, 't_proc_nlp_grad_f': 9.299999999999998e-05, 't_proc_nlp_hess_l': 1.498983, 't_proc_nlp_jac_g': 0.13950800000000002, 't_proc_total': 1.669632, 't_wall_callback_fun': 0.0, 't_wall_nlp_f': 0.000156125, 't_wall_nlp_g': 0.026169562999999996, 't_wall_nlp_grad': 0.0, 't_wall_nlp_grad_f': 9.1976e-05, 't_wall_nlp_hess_l': 1.499850852, 't_wall_nlp_jac_g': 0.13965390700000002, 't_wall_total': 1.670587903, 'unified_return_status': 'SOLVER_RET_LIMITED'}\n",
      "Solver fails under iter 2 return last iteration results!\n",
      "Setting the init for x\n",
      "Settiing the init for u\n",
      "      solver  :   t_proc      (avg)   t_wall      (avg)    n_eval\n",
      "       nlp_f  | 202.00us ( 13.47us) 195.50us ( 13.03us)        15\n",
      "       nlp_g  |  27.53ms (  1.84ms)  27.58ms (  1.84ms)        15\n",
      "  nlp_grad_f  | 100.00us ( 25.00us) 100.31us ( 25.08us)         4\n",
      "  nlp_hess_l  |   1.49 s (746.57ms)   1.49 s (746.55ms)         2\n",
      "   nlp_jac_g  | 146.34ms ( 36.59ms) 146.38ms ( 36.60ms)         4\n",
      "       total  |   1.67 s (  1.67 s)   1.67 s (  1.67 s)         1\n",
      "{'iter_count': 2, 'iterations': {'alpha_du': [0.0, 0.08546173875012796, 0.04068322029742807], 'alpha_pr': [0.0, 0.0008203099916168026, 0.0001767335855126875], 'd_norm': [0.0, 176.61437156951104, 316.68799258667076], 'inf_du': [1.2413823290799533, 25.18926906504139, 66.22000426100156], 'inf_pr': [3.8409508603350138, 3.8378000899669718, 3.837121821796591], 'mu': [0.1, 0.1, 0.1], 'obj': [230.75439590270005, 233.50266935314033, 234.73885252626675], 'regularization_size': [0.0, 0.0, 0.0]}, 'n_call_callback_fun': 0, 'n_call_nlp_f': 15, 'n_call_nlp_g': 15, 'n_call_nlp_grad': 0, 'n_call_nlp_grad_f': 4, 'n_call_nlp_hess_l': 2, 'n_call_nlp_jac_g': 4, 'n_call_total': 1, 'return_status': 'Maximum_Iterations_Exceeded', 'success': False, 't_proc_callback_fun': 0.0, 't_proc_nlp_f': 0.00020199999999999998, 't_proc_nlp_g': 0.027531, 't_proc_nlp_grad': 0.0, 't_proc_nlp_grad_f': 9.999999999999999e-05, 't_proc_nlp_hess_l': 1.493136, 't_proc_nlp_jac_g': 0.146345, 't_proc_total': 1.672458, 't_wall_callback_fun': 0.0, 't_wall_nlp_f': 0.00019550299999999997, 't_wall_nlp_g': 0.027576440000000004, 't_wall_nlp_grad': 0.0, 't_wall_nlp_grad_f': 0.000100312, 't_wall_nlp_hess_l': 1.493095053, 't_wall_nlp_jac_g': 0.146384442, 't_wall_total': 1.672405445, 'unified_return_status': 'SOLVER_RET_LIMITED'}\n",
      "Solver fails under iter 2 return last iteration results!\n",
      "Setting the init for x\n",
      "Settiing the init for u\n",
      "      solver  :   t_proc      (avg)   t_wall      (avg)    n_eval\n",
      "       nlp_f  | 177.00us ( 11.80us) 171.52us ( 11.43us)        15\n",
      "       nlp_g  |  27.31ms (  1.82ms)  27.33ms (  1.82ms)        15\n",
      "  nlp_grad_f  | 106.00us ( 26.50us) 106.96us ( 26.74us)         4\n",
      "  nlp_hess_l  |   1.55 s (773.03ms)   1.55 s (773.00ms)         2\n",
      "   nlp_jac_g  | 147.47ms ( 36.87ms) 147.53ms ( 36.88ms)         4\n",
      "       total  |   1.73 s (  1.73 s)   1.73 s (  1.73 s)         1\n",
      "{'iter_count': 2, 'iterations': {'alpha_du': [0.0, 0.09300572633389637, 0.04513064929823961], 'alpha_pr': [0.0, 0.0008652183122991725, 0.00019543356712814461], 'd_norm': [0.0, 157.8570382691444, 276.6188515405601], 'inf_du': [1.3731029003553643, 26.00355172123708, 61.14904606639274], 'inf_pr': [3.869711697371896, 3.8663635519480115, 3.86560793472724], 'mu': [0.1, 0.1, 0.1], 'obj': [246.65288218944937, 249.46426765170352, 250.82918467239597], 'regularization_size': [0.0, 0.0, 0.0]}, 'n_call_callback_fun': 0, 'n_call_nlp_f': 15, 'n_call_nlp_g': 15, 'n_call_nlp_grad': 0, 'n_call_nlp_grad_f': 4, 'n_call_nlp_hess_l': 2, 'n_call_nlp_jac_g': 4, 'n_call_total': 1, 'return_status': 'Maximum_Iterations_Exceeded', 'success': False, 't_proc_callback_fun': 0.0, 't_proc_nlp_f': 0.00017700000000000002, 't_proc_nlp_g': 0.027308000000000002, 't_proc_nlp_grad': 0.0, 't_proc_nlp_grad_f': 0.000106, 't_proc_nlp_hess_l': 1.546065, 't_proc_nlp_jac_g': 0.147474, 't_proc_total': 1.726239, 't_wall_callback_fun': 0.0, 't_wall_nlp_f': 0.00017151800000000003, 't_wall_nlp_g': 0.02733149, 't_wall_nlp_grad': 0.0, 't_wall_nlp_grad_f': 0.00010696100000000001, 't_wall_nlp_hess_l': 1.546001328, 't_wall_nlp_jac_g': 0.14752642000000002, 't_wall_total': 1.726155452, 'unified_return_status': 'SOLVER_RET_LIMITED'}\n",
      "Solver fails under iter 2 return last iteration results!\n",
      "Setting the init for x\n",
      "Settiing the init for u\n",
      "      solver  :   t_proc      (avg)   t_wall      (avg)    n_eval\n",
      "       nlp_f  | 219.00us ( 13.69us) 211.15us ( 13.20us)        16\n",
      "       nlp_g  |  29.95ms (  1.87ms)  30.00ms (  1.88ms)        16\n",
      "  nlp_grad_f  | 112.00us ( 28.00us) 111.80us ( 27.95us)         4\n",
      "  nlp_hess_l  |   1.58 s (791.70ms)   1.58 s (791.89ms)         2\n",
      "   nlp_jac_g  | 151.91ms ( 37.98ms) 151.98ms ( 37.99ms)         4\n",
      "       total  |   1.77 s (  1.77 s)   1.77 s (  1.77 s)         1\n",
      "{'iter_count': 2, 'iterations': {'alpha_du': [0.0, 0.10325363282629146, 0.0531574010503926], 'alpha_pr': [0.0, 0.000979183025239173, 0.00011372504047188725], 'd_norm': [0.0, 140.08508109390084, 232.6503559327641], 'inf_du': [1.4499597737853789, 25.468438673630498, 67.00864685457431], 'inf_pr': [3.8844564043757694, 3.8806528106023226, 3.8802114832043797], 'mu': [0.1, 0.1, 0.1], 'obj': [263.832035305684, 267.0410004224554, 267.852576797833], 'regularization_size': [0.0, 0.0, 0.0]}, 'n_call_callback_fun': 0, 'n_call_nlp_f': 16, 'n_call_nlp_g': 16, 'n_call_nlp_grad': 0, 'n_call_nlp_grad_f': 4, 'n_call_nlp_hess_l': 2, 'n_call_nlp_jac_g': 4, 'n_call_total': 1, 'return_status': 'Maximum_Iterations_Exceeded', 'success': False, 't_proc_callback_fun': 0.0, 't_proc_nlp_f': 0.00021899999999999998, 't_proc_nlp_g': 0.029948000000000002, 't_proc_nlp_grad': 0.0, 't_proc_nlp_grad_f': 0.000112, 't_proc_nlp_hess_l': 1.583399, 't_proc_nlp_jac_g': 0.151913, 't_proc_total': 1.771109, 't_wall_callback_fun': 0.0, 't_wall_nlp_f': 0.00021114799999999998, 't_wall_nlp_g': 0.030001042000000006, 't_wall_nlp_grad': 0.0, 't_wall_nlp_grad_f': 0.000111801, 't_wall_nlp_hess_l': 1.583783928, 't_wall_nlp_jac_g': 0.151977414, 't_wall_total': 1.771482435, 'unified_return_status': 'SOLVER_RET_LIMITED'}\n",
      "Solver fails under iter 2 return last iteration results!\n",
      "Setting the init for x\n",
      "Settiing the init for u\n",
      "      solver  :   t_proc      (avg)   t_wall      (avg)    n_eval\n",
      "       nlp_f  | 186.00us ( 10.94us) 180.16us ( 10.60us)        17\n",
      "       nlp_g  |  30.38ms (  1.79ms)  30.40ms (  1.79ms)        17\n",
      "  nlp_grad_f  | 106.00us ( 26.50us) 106.37us ( 26.59us)         4\n",
      "  nlp_hess_l  |   1.57 s (783.62ms)   1.57 s (783.64ms)         2\n",
      "   nlp_jac_g  | 146.85ms ( 36.71ms) 146.88ms ( 36.72ms)         4\n",
      "       total  |   1.75 s (  1.75 s)   1.75 s (  1.75 s)         1\n",
      "{'iter_count': 2, 'iterations': {'alpha_du': [0.0, 0.11733159405296456, 0.03894565349408049], 'alpha_pr': [0.0, 0.0010774688341149152, 7.011604821146655e-05], 'd_norm': [0.0, 123.61634850042341, 263.78641369924554], 'inf_du': [1.5142228437204468, 26.346369574241237, 46.197993576032104], 'inf_pr': [3.885544890196349, 3.8813583366736077, 3.8810861911653474], 'mu': [0.1, 0.1, 0.1], 'obj': [281.9026874548439, 285.5013163648347, 286.0065948935444], 'regularization_size': [0.0, 0.0, 0.0]}, 'n_call_callback_fun': 0, 'n_call_nlp_f': 17, 'n_call_nlp_g': 17, 'n_call_nlp_grad': 0, 'n_call_nlp_grad_f': 4, 'n_call_nlp_hess_l': 2, 'n_call_nlp_jac_g': 4, 'n_call_total': 1, 'return_status': 'Maximum_Iterations_Exceeded', 'success': False, 't_proc_callback_fun': 0.0, 't_proc_nlp_f': 0.00018600000000000002, 't_proc_nlp_g': 0.030378999999999996, 't_proc_nlp_grad': 0.0, 't_proc_nlp_grad_f': 0.000106, 't_proc_nlp_hess_l': 1.567247, 't_proc_nlp_jac_g': 0.146848, 't_proc_total': 1.749756, 't_wall_callback_fun': 0.0, 't_wall_nlp_f': 0.00018015999999999998, 't_wall_nlp_g': 0.030401676000000002, 't_wall_nlp_grad': 0.0, 't_wall_nlp_grad_f': 0.00010637400000000001, 't_wall_nlp_hess_l': 1.567283308, 't_wall_nlp_jac_g': 0.14687956200000002, 't_wall_total': 1.749770148, 'unified_return_status': 'SOLVER_RET_LIMITED'}\n",
      "Solver fails under iter 2 return last iteration results!\n",
      "Setting the init for x\n",
      "Settiing the init for u\n",
      "      solver  :   t_proc      (avg)   t_wall      (avg)    n_eval\n",
      "       nlp_f  | 257.00us ( 15.12us) 248.30us ( 14.61us)        17\n",
      "       nlp_g  |  30.75ms (  1.81ms)  30.88ms (  1.82ms)        17\n",
      "  nlp_grad_f  | 109.00us ( 27.25us) 107.00us ( 26.75us)         4\n",
      "  nlp_hess_l  |   1.54 s (769.20ms)   1.54 s (769.92ms)         2\n",
      "   nlp_jac_g  | 147.64ms ( 36.91ms) 147.78ms ( 36.95ms)         4\n",
      "       total  |   1.72 s (  1.72 s)   1.72 s (  1.72 s)         1\n",
      "{'iter_count': 2, 'iterations': {'alpha_du': [0.0, 0.08710666327682615, 0.03646269641952185], 'alpha_pr': [0.0, 0.0006396594139953459, 0.00014680816767258088], 'd_norm': [0.0, 106.59151628961041, 264.5753531076705], 'inf_du': [1.5919005008022349, 16.258824945371607, 31.624659708457965], 'inf_pr': [3.8733578052910262, 3.870880175507099, 3.870311898681253], 'mu': [0.1, 0.1, 0.1], 'obj': [301.0534040762789, 303.2385141365761, 304.17052668194816], 'regularization_size': [0.0, 0.0, 0.0]}, 'n_call_callback_fun': 0, 'n_call_nlp_f': 17, 'n_call_nlp_g': 17, 'n_call_nlp_grad': 0, 'n_call_nlp_grad_f': 4, 'n_call_nlp_hess_l': 2, 'n_call_nlp_jac_g': 4, 'n_call_total': 1, 'return_status': 'Maximum_Iterations_Exceeded', 'success': False, 't_proc_callback_fun': 0.0, 't_proc_nlp_f': 0.000257, 't_proc_nlp_g': 0.030752, 't_proc_nlp_grad': 0.0, 't_proc_nlp_grad_f': 0.00010899999999999999, 't_proc_nlp_hess_l': 1.538405, 't_proc_nlp_jac_g': 0.147644, 't_proc_total': 1.722575, 't_wall_callback_fun': 0.0, 't_wall_nlp_f': 0.00024830100000000003, 't_wall_nlp_g': 0.030882208999999997, 't_wall_nlp_grad': 0.0, 't_wall_nlp_grad_f': 0.000106995, 't_wall_nlp_hess_l': 1.539839604, 't_wall_nlp_jac_g': 0.147781459, 't_wall_total': 1.724161787, 'unified_return_status': 'SOLVER_RET_LIMITED'}\n",
      "Solver fails under iter 2 return last iteration results!\n",
      "Setting the init for x\n",
      "Settiing the init for u\n",
      "      solver  :   t_proc      (avg)   t_wall      (avg)    n_eval\n",
      "       nlp_f  | 200.00us ( 11.76us) 191.34us ( 11.26us)        17\n",
      "       nlp_g  |  30.11ms (  1.77ms)  30.17ms (  1.77ms)        17\n",
      "  nlp_grad_f  | 111.00us ( 27.75us) 109.43us ( 27.36us)         4\n",
      "  nlp_hess_l  |   1.58 s (788.77ms)   1.58 s (788.20ms)         2\n",
      "   nlp_jac_g  | 148.04ms ( 37.01ms) 148.21ms ( 37.05ms)         4\n",
      "       total  |   1.76 s (  1.76 s)   1.76 s (  1.76 s)         1\n",
      "{'iter_count': 2, 'iterations': {'alpha_du': [0.0, 0.06515334498764035, 0.03457921689525509], 'alpha_pr': [0.0, 0.0008126720434316832, 0.00013836040740003035], 'd_norm': [0.0, 122.84331380611151, 240.84656381916088], 'inf_du': [1.6265671169841438, 9.236143256641023, 18.845608470834964], 'inf_pr': [3.8502072859068073, 3.847078330084134, 3.8465460467590837], 'mu': [0.1, 0.1, 0.1], 'obj': [320.1103148380896, 322.88263690452635, 323.6368896034717], 'regularization_size': [0.0, 0.0, 0.0]}, 'n_call_callback_fun': 0, 'n_call_nlp_f': 17, 'n_call_nlp_g': 17, 'n_call_nlp_grad': 0, 'n_call_nlp_grad_f': 4, 'n_call_nlp_hess_l': 2, 'n_call_nlp_jac_g': 4, 'n_call_total': 1, 'return_status': 'Maximum_Iterations_Exceeded', 'success': False, 't_proc_callback_fun': 0.0, 't_proc_nlp_f': 0.0002, 't_proc_nlp_g': 0.030107999999999996, 't_proc_nlp_grad': 0.0, 't_proc_nlp_grad_f': 0.00011100000000000001, 't_proc_nlp_hess_l': 1.57755, 't_proc_nlp_jac_g': 0.148044, 't_proc_total': 1.760894, 't_wall_callback_fun': 0.0, 't_wall_nlp_f': 0.00019134099999999998, 't_wall_nlp_g': 0.03016909, 't_wall_nlp_grad': 0.0, 't_wall_nlp_grad_f': 0.000109428, 't_wall_nlp_hess_l': 1.576404969, 't_wall_nlp_jac_g': 0.148213776, 't_wall_total': 1.759909759, 'unified_return_status': 'SOLVER_RET_LIMITED'}\n",
      "Solver fails under iter 2 return last iteration results!\n",
      "Setting the init for x\n",
      "Settiing the init for u\n",
      "      solver  :   t_proc      (avg)   t_wall      (avg)    n_eval\n",
      "       nlp_f  | 207.00us ( 12.18us) 199.72us ( 11.75us)        17\n",
      "       nlp_g  |  30.50ms (  1.79ms)  30.57ms (  1.80ms)        17\n",
      "  nlp_grad_f  | 108.00us ( 27.00us) 107.65us ( 26.91us)         4\n",
      "  nlp_hess_l  |   1.53 s (766.31ms)   1.53 s (765.45ms)         2\n",
      "   nlp_jac_g  | 147.70ms ( 36.92ms) 148.01ms ( 37.00ms)         4\n",
      "       total  |   1.72 s (  1.72 s)   1.71 s (  1.71 s)         1\n",
      "{'iter_count': 2, 'iterations': {'alpha_du': [0.0, 0.044776973858042225, 0.032448534773669505], 'alpha_pr': [0.0, 0.0005779777158736738, 0.0002541268545594174], 'd_norm': [0.0, 164.44863976491953, 240.13559879062376], 'inf_du': [1.57723873352844, 4.043797288277535, 9.039247701751593], 'inf_pr': [3.81493228156116, 3.8127273357148503, 3.811758419309733], 'mu': [0.1, 0.1, 0.1], 'obj': [340.3967444878571, 342.5213335309281, 343.7381154365279], 'regularization_size': [0.0, 0.0, 0.0]}, 'n_call_callback_fun': 0, 'n_call_nlp_f': 17, 'n_call_nlp_g': 17, 'n_call_nlp_grad': 0, 'n_call_nlp_grad_f': 4, 'n_call_nlp_hess_l': 2, 'n_call_nlp_jac_g': 4, 'n_call_total': 1, 'return_status': 'Maximum_Iterations_Exceeded', 'success': False, 't_proc_callback_fun': 0.0, 't_proc_nlp_f': 0.000207, 't_proc_nlp_g': 0.030497000000000003, 't_proc_nlp_grad': 0.0, 't_proc_nlp_grad_f': 0.000108, 't_proc_nlp_hess_l': 1.5326119999999999, 't_proc_nlp_jac_g': 0.1477, 't_proc_total': 1.716249, 't_wall_callback_fun': 0.0, 't_wall_nlp_f': 0.00019972400000000003, 't_wall_nlp_g': 0.030574425000000002, 't_wall_nlp_grad': 0.0, 't_wall_nlp_grad_f': 0.000107648, 't_wall_nlp_hess_l': 1.5308909819999998, 't_wall_nlp_jac_g': 0.148009948, 't_wall_total': 1.714821827, 'unified_return_status': 'SOLVER_RET_LIMITED'}\n",
      "Solver fails under iter 2 return last iteration results!\n",
      "Setting the init for x\n",
      "Settiing the init for u\n",
      "      solver  :   t_proc      (avg)   t_wall      (avg)    n_eval\n",
      "       nlp_f  | 232.00us ( 11.05us) 227.35us ( 10.83us)        21\n",
      "       nlp_g  |  37.83ms (  1.80ms)  37.89ms (  1.80ms)        21\n",
      "  nlp_grad_f  |  98.00us ( 24.50us)  98.70us ( 24.68us)         4\n",
      "  nlp_hess_l  |   1.60 s (800.13ms)   1.60 s (798.95ms)         2\n",
      "   nlp_jac_g  | 143.17ms ( 35.79ms) 143.27ms ( 35.82ms)         4\n",
      "       total  |   1.79 s (  1.79 s)   1.78 s (  1.78 s)         1\n",
      "{'iter_count': 2, 'iterations': {'alpha_du': [0.0, 0.021962133275396516, 0.023148069616293634], 'alpha_pr': [0.0, 0.000177664170028365, 0.0001770715318458285], 'd_norm': [0.0, 319.5394144549817, 317.05531992878724], 'inf_du': [1.5117105546321248, 1.511436184965965, 2.3784931434588916], 'inf_pr': [3.7696620142775776, 3.7689922804045235, 3.768324899167917], 'mu': [0.1, 0.1, 0.1], 'obj': [361.2130484051932, 362.13932266560806, 363.0381152399918], 'regularization_size': [0.0, 0.0, 0.0]}, 'n_call_callback_fun': 0, 'n_call_nlp_f': 21, 'n_call_nlp_g': 21, 'n_call_nlp_grad': 0, 'n_call_nlp_grad_f': 4, 'n_call_nlp_hess_l': 2, 'n_call_nlp_jac_g': 4, 'n_call_total': 1, 'return_status': 'Maximum_Iterations_Exceeded', 'success': False, 't_proc_callback_fun': 0.0, 't_proc_nlp_f': 0.000232, 't_proc_nlp_g': 0.037827, 't_proc_nlp_grad': 0.0, 't_proc_nlp_grad_f': 9.8e-05, 't_proc_nlp_hess_l': 1.6002619999999999, 't_proc_nlp_jac_g': 0.143173, 't_proc_total': 1.786907, 't_wall_callback_fun': 0.0, 't_wall_nlp_f': 0.000227347, 't_wall_nlp_g': 0.037891222, 't_wall_nlp_grad': 0.0, 't_wall_nlp_grad_f': 9.870300000000001e-05, 't_wall_nlp_hess_l': 1.597903974, 't_wall_nlp_jac_g': 0.143270115, 't_wall_total': 1.784614371, 'unified_return_status': 'SOLVER_RET_LIMITED'}\n",
      "Solver fails under iter 2 return last iteration results!\n",
      "Setting the init for x\n",
      "Settiing the init for u\n",
      "      solver  :   t_proc      (avg)   t_wall      (avg)    n_eval\n",
      "       nlp_f  | 184.00us ( 11.50us) 172.72us ( 10.79us)        16\n",
      "       nlp_g  |  28.50ms (  1.78ms)  28.52ms (  1.78ms)        16\n",
      "  nlp_grad_f  |  97.00us ( 24.25us)  96.46us ( 24.11us)         4\n",
      "  nlp_hess_l  |   1.54 s (767.74ms)   1.53 s (765.87ms)         2\n",
      "   nlp_jac_g  | 146.85ms ( 36.71ms) 146.89ms ( 36.72ms)         4\n",
      "       total  |   1.72 s (  1.72 s)   1.71 s (  1.71 s)         1\n",
      "{'iter_count': 2, 'iterations': {'alpha_du': [0.0, 0.015495133900966325, 0.04887099408538453], 'alpha_pr': [0.0, 6.037107358979775e-05, 0.0007017835600531838], 'd_norm': [0.0, 442.2432484730656, 144.58094036066527], 'inf_du': [1.501485315181887, 1.6581530275350636, 2.2658793873093437], 'inf_pr': [3.716900680204472, 3.7166762869199816, 3.7140679846037816], 'mu': [0.1, 0.1, 0.1], 'obj': [381.11082749165496, 381.51043761016433, 383.56620228973503], 'regularization_size': [0.0, 0.01, 0.026666666666666665]}, 'n_call_callback_fun': 0, 'n_call_nlp_f': 16, 'n_call_nlp_g': 16, 'n_call_nlp_grad': 0, 'n_call_nlp_grad_f': 4, 'n_call_nlp_hess_l': 2, 'n_call_nlp_jac_g': 4, 'n_call_total': 1, 'return_status': 'Maximum_Iterations_Exceeded', 'success': False, 't_proc_callback_fun': 0.0, 't_proc_nlp_f': 0.000184, 't_proc_nlp_g': 0.028502999999999994, 't_proc_nlp_grad': 0.0, 't_proc_nlp_grad_f': 9.7e-05, 't_proc_nlp_hess_l': 1.5354839999999998, 't_proc_nlp_jac_g': 0.14685199999999998, 't_proc_total': 1.717468, 't_wall_callback_fun': 0.0, 't_wall_nlp_f': 0.00017271899999999997, 't_wall_nlp_g': 0.028524054, 't_wall_nlp_grad': 0.0, 't_wall_nlp_grad_f': 9.6456e-05, 't_wall_nlp_hess_l': 1.531744661, 't_wall_nlp_jac_g': 0.146889829, 't_wall_total': 1.713700474, 'unified_return_status': 'SOLVER_RET_LIMITED'}\n",
      "Solver fails under iter 2 return last iteration results!\n",
      "Setting the init for x\n",
      "Settiing the init for u\n",
      "      solver  :   t_proc      (avg)   t_wall      (avg)    n_eval\n",
      "       nlp_f  | 110.00us ( 12.22us) 104.40us ( 11.60us)         9\n",
      "       nlp_g  |  16.03ms (  1.78ms)  16.04ms (  1.78ms)         9\n",
      "  nlp_grad_f  |  99.00us ( 24.75us)  99.06us ( 24.76us)         4\n",
      "  nlp_hess_l  |   1.51 s (753.06ms)   1.51 s (753.16ms)         2\n",
      "   nlp_jac_g  | 145.62ms ( 36.41ms) 145.66ms ( 36.42ms)         4\n",
      "       total  |   1.67 s (  1.67 s)   1.67 s (  1.67 s)         1\n",
      "{'iter_count': 2, 'iterations': {'alpha_du': [0.0, 0.15457610113607193, 0.088753249012511], 'alpha_pr': [0.0, 0.00510599333238648, 0.002242020320051243], 'd_norm': [0.0, 29.675378500098425, 64.0683029788427], 'inf_du': [1.484192637578046, 27.971766619681503, 55.00614136698413], 'inf_pr': [3.6545731528208254, 3.6359129266698034, 3.627761136006273], 'mu': [0.1, 0.1, 0.1], 'obj': [402.168659146392, 409.3768992778176, 415.9892362182716], 'regularization_size': [0.0, 1.0, 0.3333333333333333]}, 'n_call_callback_fun': 0, 'n_call_nlp_f': 9, 'n_call_nlp_g': 9, 'n_call_nlp_grad': 0, 'n_call_nlp_grad_f': 4, 'n_call_nlp_hess_l': 2, 'n_call_nlp_jac_g': 4, 'n_call_total': 1, 'return_status': 'Maximum_Iterations_Exceeded', 'success': False, 't_proc_callback_fun': 0.0, 't_proc_nlp_f': 0.00011, 't_proc_nlp_g': 0.016027, 't_proc_nlp_grad': 0.0, 't_proc_nlp_grad_f': 9.900000000000001e-05, 't_proc_nlp_hess_l': 1.506125, 't_proc_nlp_jac_g': 0.145623, 't_proc_total': 1.674227, 't_wall_callback_fun': 0.0, 't_wall_nlp_f': 0.00010440100000000002, 't_wall_nlp_g': 0.016036151000000002, 't_wall_nlp_grad': 0.0, 't_wall_nlp_grad_f': 9.9055e-05, 't_wall_nlp_hess_l': 1.506321188, 't_wall_nlp_jac_g': 0.145661078, 't_wall_total': 1.674400926, 'unified_return_status': 'SOLVER_RET_LIMITED'}\n",
      "Solver fails under iter 2 return last iteration results!\n",
      "Setting the init for x\n",
      "Settiing the init for u\n",
      "      solver  :   t_proc      (avg)   t_wall      (avg)    n_eval\n",
      "       nlp_f  | 115.00us ( 11.50us) 111.68us ( 11.17us)        10\n",
      "       nlp_g  |  17.52ms (  1.75ms)  17.56ms (  1.76ms)        10\n",
      "  nlp_grad_f  | 101.00us ( 25.25us) 101.60us ( 25.40us)         4\n",
      "  nlp_hess_l  |   1.53 s (763.23ms)   1.52 s (760.81ms)         2\n",
      "   nlp_jac_g  | 147.38ms ( 36.84ms) 147.49ms ( 36.87ms)         4\n",
      "       total  |   1.70 s (  1.70 s)   1.69 s (  1.69 s)         1\n",
      "{'iter_count': 2, 'iterations': {'alpha_du': [0.0, 0.14018297725470427, 0.0864065469394713], 'alpha_pr': [0.0, 0.004031785280199895, 0.001443497694201455], 'd_norm': [0.0, 28.662838221173757, 66.99624236078566], 'inf_du': [1.3934497202793195, 32.65712620738857, 52.617925804554154], 'inf_pr': [3.5616940299557047, 3.5473340443931534, 3.5422134758795094], 'mu': [0.1, 0.1, 0.1], 'obj': [435.3570539885946, 442.0070283343359, 446.2552411452259], 'regularization_size': [0.0, 1.0, 0.3333333333333333]}, 'n_call_callback_fun': 0, 'n_call_nlp_f': 10, 'n_call_nlp_g': 10, 'n_call_nlp_grad': 0, 'n_call_nlp_grad_f': 4, 'n_call_nlp_hess_l': 2, 'n_call_nlp_jac_g': 4, 'n_call_total': 1, 'return_status': 'Maximum_Iterations_Exceeded', 'success': False, 't_proc_callback_fun': 0.0, 't_proc_nlp_f': 0.00011500000000000002, 't_proc_nlp_g': 0.017519, 't_proc_nlp_grad': 0.0, 't_proc_nlp_grad_f': 0.00010099999999999999, 't_proc_nlp_hess_l': 1.526453, 't_proc_nlp_jac_g': 0.147375, 't_proc_total': 1.697747, 't_wall_callback_fun': 0.0, 't_wall_nlp_f': 0.000111679, 't_wall_nlp_g': 0.017562163000000002, 't_wall_nlp_grad': 0.0, 't_wall_nlp_grad_f': 0.00010160099999999999, 't_wall_nlp_hess_l': 1.521612773, 't_wall_nlp_jac_g': 0.14748517, 't_wall_total': 1.692995744, 'unified_return_status': 'SOLVER_RET_LIMITED'}\n",
      "Solver fails under iter 2 return last iteration results!\n",
      "Setting the init for x\n",
      "Settiing the init for u\n",
      "      solver  :   t_proc      (avg)   t_wall      (avg)    n_eval\n",
      "       nlp_f  | 124.00us ( 12.40us) 116.02us ( 11.60us)        10\n",
      "       nlp_g  |  18.07ms (  1.81ms)  18.12ms (  1.81ms)        10\n",
      "  nlp_grad_f  | 118.00us ( 29.50us) 116.87us ( 29.22us)         4\n",
      "  nlp_hess_l  |   1.54 s (771.58ms)   1.54 s (769.96ms)         2\n",
      "   nlp_jac_g  | 145.74ms ( 36.43ms) 145.47ms ( 36.37ms)         4\n",
      "       total  |   1.71 s (  1.71 s)   1.71 s (  1.71 s)         1\n",
      "{'iter_count': 2, 'iterations': {'alpha_du': [0.0, 0.13774378955992092, 0.08872777287626774], 'alpha_pr': [0.0, 0.004430693019600547, 0.001937950155121341], 'd_norm': [0.0, 28.460144930562176, 64.59267434554316], 'inf_du': [1.3112436146775812, 29.0801186132839, 33.35670958609985], 'inf_pr': [3.579158530421788, 3.5633003777050045, 3.5563948791852873], 'mu': [0.1, 0.1, 0.1], 'obj': [466.2121572672655, 473.81259988042115, 479.1705674766162], 'regularization_size': [0.0, 1.0, 0.3333333333333333]}, 'n_call_callback_fun': 0, 'n_call_nlp_f': 10, 'n_call_nlp_g': 10, 'n_call_nlp_grad': 0, 'n_call_nlp_grad_f': 4, 'n_call_nlp_hess_l': 2, 'n_call_nlp_jac_g': 4, 'n_call_total': 1, 'return_status': 'Maximum_Iterations_Exceeded', 'success': False, 't_proc_callback_fun': 0.0, 't_proc_nlp_f': 0.000124, 't_proc_nlp_g': 0.018068, 't_proc_nlp_grad': 0.0, 't_proc_nlp_grad_f': 0.00011800000000000001, 't_proc_nlp_hess_l': 1.543158, 't_proc_nlp_jac_g': 0.145739, 't_proc_total': 1.713469, 't_wall_callback_fun': 0.0, 't_wall_nlp_f': 0.00011602499999999999, 't_wall_nlp_g': 0.018115848, 't_wall_nlp_grad': 0.0, 't_wall_nlp_grad_f': 0.000116869, 't_wall_nlp_hess_l': 1.539919875, 't_wall_nlp_jac_g': 0.145465067, 't_wall_total': 1.709929302, 'unified_return_status': 'SOLVER_RET_LIMITED'}\n",
      "Solver fails under iter 2 return last iteration results!\n",
      "Setting the init for x\n",
      "Settiing the init for u\n",
      "      solver  :   t_proc      (avg)   t_wall      (avg)    n_eval\n",
      "       nlp_f  | 131.00us ( 11.91us) 125.97us ( 11.45us)        11\n",
      "       nlp_g  |  19.59ms (  1.78ms)  19.60ms (  1.78ms)        11\n",
      "  nlp_grad_f  |  97.00us ( 24.25us)  96.85us ( 24.21us)         4\n",
      "  nlp_hess_l  |   1.54 s (770.20ms)   1.54 s (770.22ms)         2\n",
      "   nlp_jac_g  | 142.74ms ( 35.69ms) 142.78ms ( 35.70ms)         4\n",
      "       total  |   1.71 s (  1.71 s)   1.71 s (  1.71 s)         1\n",
      "{'iter_count': 2, 'iterations': {'alpha_du': [0.0, 0.14051509256412448, 0.09698434115458222], 'alpha_pr': [0.0, 0.005360883006806195, 0.0014767945228359378], 'd_norm': [0.0, 29.581162243558417, 59.855136345900746], 'inf_du': [1.2105050745967911, 24.216848806558556, 25.134963478964718], 'inf_pr': [3.7923673146709698, 3.772036877178183, 3.7664663537780307], 'mu': [0.1, 0.1, 0.1], 'obj': [499.637975471084, 508.8235467652405, 512.4894488014352], 'regularization_size': [0.0, 1.0, 0.3333333333333333]}, 'n_call_callback_fun': 0, 'n_call_nlp_f': 11, 'n_call_nlp_g': 11, 'n_call_nlp_grad': 0, 'n_call_nlp_grad_f': 4, 'n_call_nlp_hess_l': 2, 'n_call_nlp_jac_g': 4, 'n_call_total': 1, 'return_status': 'Maximum_Iterations_Exceeded', 'success': False, 't_proc_callback_fun': 0.0, 't_proc_nlp_f': 0.00013099999999999999, 't_proc_nlp_g': 0.019591, 't_proc_nlp_grad': 0.0, 't_proc_nlp_grad_f': 9.7e-05, 't_proc_nlp_hess_l': 1.540408, 't_proc_nlp_jac_g': 0.142744, 't_proc_total': 1.709226, 't_wall_callback_fun': 0.0, 't_wall_nlp_f': 0.00012596799999999998, 't_wall_nlp_g': 0.019602997, 't_wall_nlp_grad': 0.0, 't_wall_nlp_grad_f': 9.6851e-05, 't_wall_nlp_hess_l': 1.540438237, 't_wall_nlp_jac_g': 0.142781197, 't_wall_total': 1.709228066, 'unified_return_status': 'SOLVER_RET_LIMITED'}\n",
      "Solver fails under iter 2 return last iteration results!\n",
      "Setting the init for x\n",
      "Settiing the init for u\n",
      "      solver  :   t_proc      (avg)   t_wall      (avg)    n_eval\n",
      "       nlp_f  | 134.00us ( 13.40us) 128.48us ( 12.85us)        10\n",
      "       nlp_g  |  19.07ms (  1.91ms)  19.08ms (  1.91ms)        10\n",
      "  nlp_grad_f  | 104.00us ( 26.00us) 104.41us ( 26.10us)         4\n",
      "  nlp_hess_l  |   1.65 s (826.89ms)   1.66 s (827.60ms)         2\n",
      "   nlp_jac_g  | 150.52ms ( 37.63ms) 150.58ms ( 37.65ms)         4\n",
      "       total  |   1.83 s (  1.83 s)   1.83 s (  1.83 s)         1\n",
      "{'iter_count': 2, 'iterations': {'alpha_du': [0.0, 0.14663030241445194, 0.10955795159463648], 'alpha_pr': [0.0, 0.006841092340675917, 0.00325525430295249], 'd_norm': [0.0, 29.646357832963144, 52.68358439104893], 'inf_du': [1.1158320787035414, 19.477807561630787, 17.175314301047294], 'inf_pr': [3.9423506084687094, 3.915380623916855, 3.902635064293153], 'mu': [0.1, 0.1, 0.1], 'obj': [533.3390928926116, 544.6040024001476, 551.5698885577775], 'regularization_size': [0.0, 1.0, 0.3333333333333333]}, 'n_call_callback_fun': 0, 'n_call_nlp_f': 10, 'n_call_nlp_g': 10, 'n_call_nlp_grad': 0, 'n_call_nlp_grad_f': 4, 'n_call_nlp_hess_l': 2, 'n_call_nlp_jac_g': 4, 'n_call_total': 1, 'return_status': 'Maximum_Iterations_Exceeded', 'success': False, 't_proc_callback_fun': 0.0, 't_proc_nlp_f': 0.000134, 't_proc_nlp_g': 0.019069, 't_proc_nlp_grad': 0.0, 't_proc_nlp_grad_f': 0.000104, 't_proc_nlp_hess_l': 1.653788, 't_proc_nlp_jac_g': 0.150521, 't_proc_total': 1.830098, 't_wall_callback_fun': 0.0, 't_wall_nlp_f': 0.00012847799999999999, 't_wall_nlp_g': 0.019081626, 't_wall_nlp_grad': 0.0, 't_wall_nlp_grad_f': 0.000104407, 't_wall_nlp_hess_l': 1.655207133, 't_wall_nlp_jac_g': 0.15058027400000001, 't_wall_total': 1.831512209, 'unified_return_status': 'SOLVER_RET_LIMITED'}\n",
      "Solver fails under iter 2 return last iteration results!\n",
      "Setting the init for x\n",
      "Settiing the init for u\n",
      "      solver  :   t_proc      (avg)   t_wall      (avg)    n_eval\n",
      "       nlp_f  |  79.00us ( 15.80us)  73.35us ( 14.67us)         5\n",
      "       nlp_g  |   9.46ms (  1.89ms)   9.47ms (  1.89ms)         5\n",
      "  nlp_grad_f  | 104.00us ( 26.00us) 104.55us ( 26.14us)         4\n",
      "  nlp_hess_l  |   1.59 s (795.33ms)   1.59 s (795.34ms)         2\n",
      "   nlp_jac_g  | 150.16ms ( 37.54ms) 150.20ms ( 37.55ms)         4\n",
      "       total  |   1.76 s (  1.76 s)   1.76 s (  1.76 s)         1\n",
      "{'iter_count': 2, 'iterations': {'alpha_du': [0.0, 0.1591400024909413, 0.0014085518281113788], 'alpha_pr': [0.0, 0.00477511859499657, 0.003129117101909735], 'd_norm': [0.0, 28.8476318667714, 2739.578773555797], 'inf_du': [1.156812845644338, 15.306999083656628, 30.465300764018323], 'inf_pr': [4.026241344713702, 4.007015564800615, 3.994477143869179], 'mu': [0.1, 0.1, 0.1], 'obj': [572.7253293720842, 579.8608244944758, 554.2696003490621], 'regularization_size': [0.0, 1.0, 0.0]}, 'n_call_callback_fun': 0, 'n_call_nlp_f': 5, 'n_call_nlp_g': 5, 'n_call_nlp_grad': 0, 'n_call_nlp_grad_f': 4, 'n_call_nlp_hess_l': 2, 'n_call_nlp_jac_g': 4, 'n_call_total': 1, 'return_status': 'Maximum_Iterations_Exceeded', 'success': False, 't_proc_callback_fun': 0.0, 't_proc_nlp_f': 7.900000000000001e-05, 't_proc_nlp_g': 0.009459, 't_proc_nlp_grad': 0.0, 't_proc_nlp_grad_f': 0.00010400000000000001, 't_proc_nlp_hess_l': 1.590667, 't_proc_nlp_jac_g': 0.15015599999999998, 't_proc_total': 1.756111, 't_wall_callback_fun': 0.0, 't_wall_nlp_f': 7.3353e-05, 't_wall_nlp_g': 0.009466662, 't_wall_nlp_grad': 0.0, 't_wall_nlp_grad_f': 0.00010454899999999999, 't_wall_nlp_hess_l': 1.590674844, 't_wall_nlp_jac_g': 0.15020123999999999, 't_wall_total': 1.756100008, 'unified_return_status': 'SOLVER_RET_LIMITED'}\n",
      "Solver fails under iter 2 return last iteration results!\n",
      "Setting the init for x\n",
      "Settiing the init for u\n",
      "      solver  :   t_proc      (avg)   t_wall      (avg)    n_eval\n",
      "       nlp_f  |  56.00us ( 18.67us)  50.20us ( 16.73us)         3\n",
      "       nlp_g  |   5.45ms (  1.82ms)   5.45ms (  1.82ms)         3\n",
      "  nlp_grad_f  |  97.00us ( 24.25us)  96.05us ( 24.01us)         4\n",
      "  nlp_hess_l  |   1.51 s (754.73ms)   1.51 s (754.74ms)         2\n",
      "   nlp_jac_g  | 141.11ms ( 35.28ms) 141.19ms ( 35.30ms)         4\n",
      "       total  |   1.66 s (  1.66 s)   1.66 s (  1.66 s)         1\n",
      "{'iter_count': 2, 'iterations': {'alpha_du': [0.0, 0.0443899369779863, 0.1940870407995184], 'alpha_pr': [0.0, 0.04544276569487113, 0.1418087417607503], 'd_norm': [0.0, 63.5226573196722, 28.475688784466406], 'inf_du': [1.1238797121819497, 1.2394157531916665, 2.60208694849932], 'inf_pr': [4.056870201341948, 3.872514799327862, 3.3233583481852933], 'mu': [0.1, 0.1, 0.1], 'obj': [570.7185336390799, 510.86783278875123, 431.95746181049685], 'regularization_size': [0.0, 0.0, 0.0]}, 'n_call_callback_fun': 0, 'n_call_nlp_f': 3, 'n_call_nlp_g': 3, 'n_call_nlp_grad': 0, 'n_call_nlp_grad_f': 4, 'n_call_nlp_hess_l': 2, 'n_call_nlp_jac_g': 4, 'n_call_total': 1, 'return_status': 'Maximum_Iterations_Exceeded', 'success': False, 't_proc_callback_fun': 0.0, 't_proc_nlp_f': 5.6000000000000006e-05, 't_proc_nlp_g': 0.005452, 't_proc_nlp_grad': 0.0, 't_proc_nlp_grad_f': 9.7e-05, 't_proc_nlp_hess_l': 1.5094560000000001, 't_proc_nlp_jac_g': 0.14111200000000002, 't_proc_total': 1.660071, 't_wall_callback_fun': 0.0, 't_wall_nlp_f': 5.0198e-05, 't_wall_nlp_g': 0.005454707, 't_wall_nlp_grad': 0.0, 't_wall_nlp_grad_f': 9.605200000000001e-05, 't_wall_nlp_hess_l': 1.509487244, 't_wall_nlp_jac_g': 0.141191129, 't_wall_total': 1.660117924, 'unified_return_status': 'SOLVER_RET_LIMITED'}\n",
      "Solver fails under iter 2 return last iteration results!\n",
      "Setting the init for x\n",
      "Settiing the init for u\n",
      "      solver  :   t_proc      (avg)   t_wall      (avg)    n_eval\n",
      "       nlp_f  |  52.00us ( 17.33us)  47.45us ( 15.82us)         3\n",
      "       nlp_g  |   5.76ms (  1.92ms)   5.76ms (  1.92ms)         3\n",
      "  nlp_grad_f  |  98.00us ( 24.50us)  98.69us ( 24.67us)         4\n",
      "  nlp_hess_l  |   1.54 s (768.81ms)   1.54 s (768.78ms)         2\n",
      "   nlp_jac_g  | 145.87ms ( 36.47ms) 145.90ms ( 36.47ms)         4\n",
      "       total  |   1.69 s (  1.69 s)   1.69 s (  1.69 s)         1\n",
      "{'iter_count': 2, 'iterations': {'alpha_du': [0.0, 0.20851992240546607, 0.2637633728227664], 'alpha_pr': [0.0, 0.2792642475980011, 0.45851524644327574], 'd_norm': [0.0, 17.27377699886616, 13.905886657883174], 'inf_du': [0.9105786870400474, 3.6564431380025955, 3.8471375103385648], 'inf_pr': [3.8872105110384942, 2.8016515924182874, 1.5170516220724206], 'mu': [0.1, 0.1, 0.1], 'obj': [437.96877555169453, 383.8223361326065, 368.2621513485949], 'regularization_size': [0.0, 0.0, 0.0]}, 'n_call_callback_fun': 0, 'n_call_nlp_f': 3, 'n_call_nlp_g': 3, 'n_call_nlp_grad': 0, 'n_call_nlp_grad_f': 4, 'n_call_nlp_hess_l': 2, 'n_call_nlp_jac_g': 4, 'n_call_total': 1, 'return_status': 'Maximum_Iterations_Exceeded', 'success': False, 't_proc_callback_fun': 0.0, 't_proc_nlp_f': 5.2000000000000004e-05, 't_proc_nlp_g': 0.005762, 't_proc_nlp_grad': 0.0, 't_proc_nlp_grad_f': 9.8e-05, 't_proc_nlp_hess_l': 1.537628, 't_proc_nlp_jac_g': 0.145867, 't_proc_total': 1.693373, 't_wall_callback_fun': 0.0, 't_wall_nlp_f': 4.7454e-05, 't_wall_nlp_g': 0.00576368, 't_wall_nlp_grad': 0.0, 't_wall_nlp_grad_f': 9.8694e-05, 't_wall_nlp_hess_l': 1.537562363, 't_wall_nlp_jac_g': 0.145896706, 't_wall_total': 1.69327308, 'unified_return_status': 'SOLVER_RET_LIMITED'}\n",
      "Solver fails under iter 2 return last iteration results!\n",
      "Setting the init for x\n",
      "Settiing the init for u\n",
      "      solver  :   t_proc      (avg)   t_wall      (avg)    n_eval\n",
      "       nlp_f  |  48.00us ( 16.00us)  45.54us ( 15.18us)         3\n",
      "       nlp_g  |   5.62ms (  1.87ms)   5.63ms (  1.88ms)         3\n",
      "  nlp_grad_f  | 100.00us ( 25.00us)  98.83us ( 24.71us)         4\n",
      "  nlp_hess_l  |   1.54 s (768.64ms)   1.54 s (768.61ms)         2\n",
      "   nlp_jac_g  | 146.87ms ( 36.72ms) 146.92ms ( 36.73ms)         4\n",
      "       total  |   1.69 s (  1.69 s)   1.69 s (  1.69 s)         1\n",
      "{'iter_count': 2, 'iterations': {'alpha_du': [0.0, 0.21839454270221467, 0.0010513732872286558], 'alpha_pr': [0.0, 0.4083627339395783, 0.0019677309094799133], 'd_norm': [0.0, 7.878013912049736, 645.0598567658672], 'inf_du': [0.4482415667369121, 1.034691782429023, 1.1720924991400654], 'inf_pr': [2.360014207618698, 1.396272353659279, 1.3935248653909311], 'mu': [0.1, 0.1, 0.1], 'obj': [365.22569396733957, 352.7847763727271, 348.66542697489604], 'regularization_size': [0.0, 0.0, 0.0]}, 'n_call_callback_fun': 0, 'n_call_nlp_f': 3, 'n_call_nlp_g': 3, 'n_call_nlp_grad': 0, 'n_call_nlp_grad_f': 4, 'n_call_nlp_hess_l': 2, 'n_call_nlp_jac_g': 4, 'n_call_total': 1, 'return_status': 'Maximum_Iterations_Exceeded', 'success': False, 't_proc_callback_fun': 0.0, 't_proc_nlp_f': 4.8e-05, 't_proc_nlp_g': 0.005622, 't_proc_nlp_grad': 0.0, 't_proc_nlp_grad_f': 0.0001, 't_proc_nlp_hess_l': 1.537285, 't_proc_nlp_jac_g': 0.14686700000000003, 't_proc_total': 1.693896, 't_wall_callback_fun': 0.0, 't_wall_nlp_f': 4.5539e-05, 't_wall_nlp_g': 0.0056250729999999995, 't_wall_nlp_grad': 0.0, 't_wall_nlp_grad_f': 9.8832e-05, 't_wall_nlp_hess_l': 1.537213473, 't_wall_nlp_jac_g': 0.146915134, 't_wall_total': 1.693810831, 'unified_return_status': 'SOLVER_RET_LIMITED'}\n",
      "Solver fails under iter 2 return last iteration results!\n",
      "Setting the init for x\n",
      "Settiing the init for u\n",
      "      solver  :   t_proc      (avg)   t_wall      (avg)    n_eval\n",
      "       nlp_f  |  50.00us ( 16.67us)  46.00us ( 15.33us)         3\n",
      "       nlp_g  |   5.54ms (  1.85ms)   5.55ms (  1.85ms)         3\n",
      "  nlp_grad_f  | 102.00us ( 25.50us) 101.37us ( 25.34us)         4\n",
      "  nlp_hess_l  |   1.51 s (755.66ms)   1.51 s (755.88ms)         2\n",
      "   nlp_jac_g  | 143.75ms ( 35.94ms) 143.84ms ( 35.96ms)         4\n",
      "       total  |   1.67 s (  1.67 s)   1.67 s (  1.67 s)         1\n",
      "{'iter_count': 2, 'iterations': {'alpha_du': [0.0, 0.2338797760696526, 0.17295241810141634], 'alpha_pr': [0.0, 0.08170940899726167, 0.24734858676416102], 'd_norm': [0.0, 13.349486149288717, 4.674591538615456], 'inf_du': [0.5605937634521718, 1.9850995506901763, 3.6096907944454757], 'inf_pr': [1.5347995782783128, 1.4093920118079453, 1.0607808894905526], 'mu': [0.1, 0.1, 0.1], 'obj': [343.661018762157, 337.5093659072313, 319.96462817961543], 'regularization_size': [0.0, 0.0, 1.0]}, 'n_call_callback_fun': 0, 'n_call_nlp_f': 3, 'n_call_nlp_g': 3, 'n_call_nlp_grad': 0, 'n_call_nlp_grad_f': 4, 'n_call_nlp_hess_l': 2, 'n_call_nlp_jac_g': 4, 'n_call_total': 1, 'return_status': 'Maximum_Iterations_Exceeded', 'success': False, 't_proc_callback_fun': 0.0, 't_proc_nlp_f': 4.9999999999999996e-05, 't_proc_nlp_g': 0.00554, 't_proc_nlp_grad': 0.0, 't_proc_nlp_grad_f': 0.00010199999999999999, 't_proc_nlp_hess_l': 1.51132, 't_proc_nlp_jac_g': 0.143748, 't_proc_total': 1.665974, 't_wall_callback_fun': 0.0, 't_wall_nlp_f': 4.5997e-05, 't_wall_nlp_g': 0.005546955, 't_wall_nlp_grad': 0.0, 't_wall_nlp_grad_f': 0.00010137, 't_wall_nlp_hess_l': 1.511764223, 't_wall_nlp_jac_g': 0.143842469, 't_wall_total': 1.666464368, 'unified_return_status': 'SOLVER_RET_LIMITED'}\n",
      "Solver fails under iter 2 return last iteration results!\n",
      "Setting the init for x\n",
      "Settiing the init for u\n",
      "      solver  :   t_proc      (avg)   t_wall      (avg)    n_eval\n",
      "       nlp_f  |  51.00us ( 17.00us)  48.73us ( 16.24us)         3\n",
      "       nlp_g  |   5.56ms (  1.85ms)   5.57ms (  1.86ms)         3\n",
      "  nlp_grad_f  |  96.00us ( 24.00us)  95.56us ( 23.89us)         4\n",
      "  nlp_hess_l  |   1.50 s (752.26ms)   1.51 s (752.58ms)         2\n",
      "   nlp_jac_g  | 142.36ms ( 35.59ms) 142.46ms ( 35.62ms)         4\n",
      "       total  |   1.66 s (  1.66 s)   1.66 s (  1.66 s)         1\n",
      "{'iter_count': 2, 'iterations': {'alpha_du': [0.0, 0.15184468633023257, 0.07154807745150552], 'alpha_pr': [0.0, 0.19721301046262119, 1.0], 'd_norm': [0.0, 16.75165672470443, 2.2315567444039477], 'inf_du': [0.6183112612442438, 4.1945538404660985, 17.577177030080268], 'inf_pr': [1.0779831919813052, 0.8653908814625666, 0.12527076087862632], 'mu': [0.1, 0.1, 0.1], 'obj': [314.9506498753303, 296.45388539358237, 271.21330701203146], 'regularization_size': [0.0, 0.0, 1.0]}, 'n_call_callback_fun': 0, 'n_call_nlp_f': 3, 'n_call_nlp_g': 3, 'n_call_nlp_grad': 0, 'n_call_nlp_grad_f': 4, 'n_call_nlp_hess_l': 2, 'n_call_nlp_jac_g': 4, 'n_call_total': 1, 'return_status': 'Maximum_Iterations_Exceeded', 'success': False, 't_proc_callback_fun': 0.0, 't_proc_nlp_f': 5.1e-05, 't_proc_nlp_g': 0.0055580000000000004, 't_proc_nlp_grad': 0.0, 't_proc_nlp_grad_f': 9.6e-05, 't_proc_nlp_hess_l': 1.504529, 't_proc_nlp_jac_g': 0.142358, 't_proc_total': 1.657748, 't_wall_callback_fun': 0.0, 't_wall_nlp_f': 4.8726e-05, 't_wall_nlp_g': 0.0055681, 't_wall_nlp_grad': 0.0, 't_wall_nlp_grad_f': 9.555599999999999e-05, 't_wall_nlp_hess_l': 1.505167891, 't_wall_nlp_jac_g': 0.142460922, 't_wall_total': 1.658441072, 'unified_return_status': 'SOLVER_RET_LIMITED'}\n",
      "Solver fails under iter 2 return last iteration results!\n",
      "Setting the init for x\n",
      "Settiing the init for u\n",
      "      solver  :   t_proc      (avg)   t_wall      (avg)    n_eval\n",
      "       nlp_f  |  52.00us ( 17.33us)  47.65us ( 15.88us)         3\n",
      "       nlp_g  |   5.53ms (  1.84ms)   5.53ms (  1.84ms)         3\n",
      "  nlp_grad_f  | 100.00us ( 25.00us)  98.82us ( 24.70us)         4\n",
      "  nlp_hess_l  |   1.52 s (760.31ms)   1.52 s (760.59ms)         2\n",
      "   nlp_jac_g  | 144.27ms ( 36.07ms) 144.31ms ( 36.08ms)         4\n",
      "       total  |   1.68 s (  1.68 s)   1.68 s (  1.68 s)         1\n",
      "{'iter_count': 2, 'iterations': {'alpha_du': [0.0, 0.7736281557226086, 0.3636105750584288], 'alpha_pr': [0.0, 1.0, 0.4761920903524638], 'd_norm': [0.0, 0.9881838305199961, 3.022043244622372], 'inf_du': [0.71880085415551, 0.9881838305199961, 0.9973095365429309], 'inf_pr': [0.12527076087862632, 0.015150515901655837, 0.07932545707018335], 'mu': [0.1, 0.1, 0.1], 'obj': [265.2896175337336, 248.021592746764, 227.59898077692068], 'regularization_size': [0.0, 1.0, 0.3333333333333333]}, 'n_call_callback_fun': 0, 'n_call_nlp_f': 3, 'n_call_nlp_g': 3, 'n_call_nlp_grad': 0, 'n_call_nlp_grad_f': 4, 'n_call_nlp_hess_l': 2, 'n_call_nlp_jac_g': 4, 'n_call_total': 1, 'return_status': 'Maximum_Iterations_Exceeded', 'success': False, 't_proc_callback_fun': 0.0, 't_proc_nlp_f': 5.2e-05, 't_proc_nlp_g': 0.005534, 't_proc_nlp_grad': 0.0, 't_proc_nlp_grad_f': 9.999999999999999e-05, 't_proc_nlp_hess_l': 1.5206279999999999, 't_proc_nlp_jac_g': 0.14427, 't_proc_total': 1.676102, 't_wall_callback_fun': 0.0, 't_wall_nlp_f': 4.7645e-05, 't_wall_nlp_g': 0.005534179, 't_wall_nlp_grad': 0.0, 't_wall_nlp_grad_f': 9.8816e-05, 't_wall_nlp_hess_l': 1.521179934, 't_wall_nlp_jac_g': 0.14431398499999998, 't_wall_total': 1.676637072, 'unified_return_status': 'SOLVER_RET_LIMITED'}\n",
      "Solver fails under iter 2 return last iteration results!\n",
      "Setting the init for x\n",
      "Settiing the init for u\n",
      "      solver  :   t_proc      (avg)   t_wall      (avg)    n_eval\n",
      "       nlp_f  |  51.00us ( 17.00us)  44.91us ( 14.97us)         3\n",
      "       nlp_g  |   5.37ms (  1.79ms)   5.38ms (  1.79ms)         3\n",
      "  nlp_grad_f  |  95.00us ( 23.75us)  95.35us ( 23.84us)         4\n",
      "  nlp_hess_l  |   1.45 s (724.37ms)   1.45 s (724.36ms)         2\n",
      "   nlp_jac_g  | 139.17ms ( 34.79ms) 139.20ms ( 34.80ms)         4\n",
      "       total  |   1.60 s (  1.60 s)   1.60 s (  1.60 s)         1\n",
      "{'iter_count': 2, 'iterations': {'alpha_du': [0.0, 0.799834479363885, 0.6330424606932237], 'alpha_pr': [0.0, 0.4527202970434403, 0.4583520548417706], 'd_norm': [0.0, 0.9645156247418181, 2.7062824021790792], 'inf_du': [1.0994161411569776, 1.038343939294193, 1.3873188120558861], 'inf_pr': [0.07932545707018335, 0.04790727982463849, 0.09831444261986189], 'mu': [0.1, 0.1, 0.1], 'obj': [222.223355817884, 213.98768412189185, 196.36375875102385], 'regularization_size': [0.0, 1.0, 0.3333333333333333]}, 'n_call_callback_fun': 0, 'n_call_nlp_f': 3, 'n_call_nlp_g': 3, 'n_call_nlp_grad': 0, 'n_call_nlp_grad_f': 4, 'n_call_nlp_hess_l': 2, 'n_call_nlp_jac_g': 4, 'n_call_total': 1, 'return_status': 'Maximum_Iterations_Exceeded', 'success': False, 't_proc_callback_fun': 0.0, 't_proc_nlp_f': 5.099999999999999e-05, 't_proc_nlp_g': 0.005374, 't_proc_nlp_grad': 0.0, 't_proc_nlp_grad_f': 9.5e-05, 't_proc_nlp_hess_l': 1.4487320000000001, 't_proc_nlp_jac_g': 0.13917200000000002, 't_proc_total': 1.598768, 't_wall_callback_fun': 0.0, 't_wall_nlp_f': 4.4908e-05, 't_wall_nlp_g': 0.00537601, 't_wall_nlp_grad': 0.0, 't_wall_nlp_grad_f': 9.535299999999999e-05, 't_wall_nlp_hess_l': 1.4487184690000001, 't_wall_nlp_jac_g': 0.139198438, 't_wall_total': 1.598726188, 'unified_return_status': 'SOLVER_RET_LIMITED'}\n",
      "Solver fails under iter 2 return last iteration results!\n",
      "Setting the init for x\n",
      "Settiing the init for u\n",
      "      solver  :   t_proc      (avg)   t_wall      (avg)    n_eval\n",
      "       nlp_f  |  44.00us ( 14.67us)  41.96us ( 13.99us)         3\n",
      "       nlp_g  |   5.30ms (  1.77ms)   5.30ms (  1.77ms)         3\n",
      "  nlp_grad_f  |  94.00us ( 23.50us)  93.74us ( 23.43us)         4\n",
      "  nlp_hess_l  |   1.45 s (727.06ms)   1.45 s (726.99ms)         2\n",
      "   nlp_jac_g  | 139.18ms ( 34.80ms) 139.21ms ( 34.80ms)         4\n",
      "       total  |   1.60 s (  1.60 s)   1.60 s (  1.60 s)         1\n",
      "{'iter_count': 2, 'iterations': {'alpha_du': [0.0, 0.5190121304375596, 0.7817251058138186], 'alpha_pr': [0.0, 1.0, 1.0], 'd_norm': [0.0, 5.009797458074101, 9.486141136263802], 'inf_du': [1.0250991061122485, 2.5744202326332997, 0.502455456027803], 'inf_pr': [0.09831444261986189, 1.6993229411888429, 0.24596030561695092], 'mu': [0.1, 0.1, 0.1], 'obj': [191.00053410936238, 163.6902035662935, 152.91522178461562], 'regularization_size': [0.0, 0.0, 0.0]}, 'n_call_callback_fun': 0, 'n_call_nlp_f': 3, 'n_call_nlp_g': 3, 'n_call_nlp_grad': 0, 'n_call_nlp_grad_f': 4, 'n_call_nlp_hess_l': 2, 'n_call_nlp_jac_g': 4, 'n_call_total': 1, 'return_status': 'Maximum_Iterations_Exceeded', 'success': False, 't_proc_callback_fun': 0.0, 't_proc_nlp_f': 4.4e-05, 't_proc_nlp_g': 0.0053, 't_proc_nlp_grad': 0.0, 't_proc_nlp_grad_f': 9.4e-05, 't_proc_nlp_hess_l': 1.454125, 't_proc_nlp_jac_g': 0.139184, 't_proc_total': 1.602478, 't_wall_callback_fun': 0.0, 't_wall_nlp_f': 4.1956e-05, 't_wall_nlp_g': 0.005302615, 't_wall_nlp_grad': 0.0, 't_wall_nlp_grad_f': 9.3737e-05, 't_wall_nlp_hess_l': 1.453975501, 't_wall_nlp_jac_g': 0.13921101000000002, 't_wall_total': 1.602300184, 'unified_return_status': 'SOLVER_RET_LIMITED'}\n",
      "Solver fails under iter 2 return last iteration results!\n",
      "Setting the init for x\n",
      "Settiing the init for u\n",
      "      solver  :   t_proc      (avg)   t_wall      (avg)    n_eval\n",
      "       nlp_f  |  48.00us ( 16.00us)  44.60us ( 14.87us)         3\n",
      "       nlp_g  |   5.26ms (  1.75ms)   5.26ms (  1.75ms)         3\n",
      "  nlp_grad_f  |  94.00us ( 23.50us)  93.70us ( 23.42us)         4\n",
      "  nlp_hess_l  |   1.45 s (726.34ms)   1.45 s (726.31ms)         2\n",
      "   nlp_jac_g  | 138.43ms ( 34.61ms) 138.46ms ( 34.61ms)         4\n",
      "       total  |   1.60 s (  1.60 s)   1.60 s (  1.60 s)         1\n",
      "{'iter_count': 2, 'iterations': {'alpha_du': [0.0, 0.9520812250494282, 0.9447895585394157], 'alpha_pr': [0.0, 0.9933786696089979, 1.0], 'd_norm': [0.0, 0.701541826213987, 0.7864159963067134], 'inf_du': [0.23624314173738198, 0.1470189905735897, 0.029680417715770208], 'inf_pr': [0.24596030561695092, 0.003822024107424493, 0.005466703860809163], 'mu': [0.1, 0.1, 0.020000000000000004], 'obj': [142.09863203770846, 141.00833400524164, 139.94179497150978], 'regularization_size': [0.0, 0.0, 0.0]}, 'n_call_callback_fun': 0, 'n_call_nlp_f': 3, 'n_call_nlp_g': 3, 'n_call_nlp_grad': 0, 'n_call_nlp_grad_f': 4, 'n_call_nlp_hess_l': 2, 'n_call_nlp_jac_g': 4, 'n_call_total': 1, 'return_status': 'Maximum_Iterations_Exceeded', 'success': False, 't_proc_callback_fun': 0.0, 't_proc_nlp_f': 4.8e-05, 't_proc_nlp_g': 0.005262, 't_proc_nlp_grad': 0.0, 't_proc_nlp_grad_f': 9.400000000000001e-05, 't_proc_nlp_hess_l': 1.452683, 't_proc_nlp_jac_g': 0.138433, 't_proc_total': 1.600284, 't_wall_callback_fun': 0.0, 't_wall_nlp_f': 4.4603e-05, 't_wall_nlp_g': 0.005262276, 't_wall_nlp_grad': 0.0, 't_wall_nlp_grad_f': 9.3698e-05, 't_wall_nlp_hess_l': 1.452628261, 't_wall_nlp_jac_g': 0.13845924399999998, 't_wall_total': 1.600199582, 'unified_return_status': 'SOLVER_RET_LIMITED'}\n",
      "Solver fails under iter 2 return last iteration results!\n",
      "Setting the init for x\n",
      "Settiing the init for u\n",
      "      solver  :   t_proc      (avg)   t_wall      (avg)    n_eval\n",
      "       nlp_f  |  49.00us ( 16.33us)  44.33us ( 14.78us)         3\n",
      "       nlp_g  |   5.29ms (  1.76ms)   5.29ms (  1.76ms)         3\n",
      "  nlp_grad_f  |  90.00us ( 22.50us)  90.38us ( 22.59us)         4\n",
      "  nlp_hess_l  |   1.46 s (728.66ms)   1.46 s (728.66ms)         2\n",
      "   nlp_jac_g  | 137.91ms ( 34.48ms) 137.94ms ( 34.49ms)         4\n",
      "       total  |   1.60 s (  1.60 s)   1.60 s (  1.60 s)         1\n",
      "{'iter_count': 2, 'iterations': {'alpha_du': [0.0, 1.0, 0.9091457207363348], 'alpha_pr': [0.0, 1.0, 1.0], 'd_norm': [0.0, 0.13666097869654412, 0.5546745491774926], 'inf_du': [0.2072446718545865, 0.1512672401083428, 0.014825189699465113], 'inf_pr': [0.024382474746984517, 0.00029338015069191314, 0.0006225057994422301], 'mu': [0.1, 0.1, 0.002828427124746191], 'obj': [130.33163148174518, 131.04647825120085, 130.0586956599628], 'regularization_size': [0.0, 0.0, 0.0]}, 'n_call_callback_fun': 0, 'n_call_nlp_f': 3, 'n_call_nlp_g': 3, 'n_call_nlp_grad': 0, 'n_call_nlp_grad_f': 4, 'n_call_nlp_hess_l': 2, 'n_call_nlp_jac_g': 4, 'n_call_total': 1, 'return_status': 'Maximum_Iterations_Exceeded', 'success': False, 't_proc_callback_fun': 0.0, 't_proc_nlp_f': 4.9e-05, 't_proc_nlp_g': 0.005287999999999999, 't_proc_nlp_grad': 0.0, 't_proc_nlp_grad_f': 8.999999999999999e-05, 't_proc_nlp_hess_l': 1.4573209999999999, 't_proc_nlp_jac_g': 0.137912, 't_proc_total': 1.604381, 't_wall_callback_fun': 0.0, 't_wall_nlp_f': 4.4325e-05, 't_wall_nlp_g': 0.005291331999999999, 't_wall_nlp_grad': 0.0, 't_wall_nlp_grad_f': 9.0376e-05, 't_wall_nlp_hess_l': 1.457324278, 't_wall_nlp_jac_g': 0.137942802, 't_wall_total': 1.604362116, 'unified_return_status': 'SOLVER_RET_LIMITED'}\n",
      "Solver fails under iter 2 return last iteration results!\n",
      "Setting the init for x\n",
      "Settiing the init for u\n",
      "      solver  :   t_proc      (avg)   t_wall      (avg)    n_eval\n",
      "       nlp_f  |  47.00us ( 15.67us)  43.97us ( 14.66us)         3\n",
      "       nlp_g  |   5.26ms (  1.75ms)   5.27ms (  1.76ms)         3\n",
      "  nlp_grad_f  |  96.00us ( 24.00us)  95.17us ( 23.79us)         4\n",
      "  nlp_hess_l  |   1.46 s (728.18ms)   1.46 s (728.17ms)         2\n",
      "   nlp_jac_g  | 139.21ms ( 34.80ms) 139.24ms ( 34.81ms)         4\n",
      "       total  |   1.60 s (  1.60 s)   1.60 s (  1.60 s)         1\n",
      "{'iter_count': 2, 'iterations': {'alpha_du': [0.0, 1.0, 0.959465246248396], 'alpha_pr': [0.0, 1.0, 1.0], 'd_norm': [0.0, 0.15477124254452682, 0.29338838922582433], 'inf_du': [0.19758528766073646, 0.19520493269279093, 0.00683918065082767], 'inf_pr': [0.028530021396353522, 0.0003176518830649844, 0.00018351970207586277], 'mu': [0.1, 0.1, 0.002828427124746191], 'obj': [121.70869788176275, 122.48820753422817, 121.67700303281623], 'regularization_size': [0.0, 0.0, 0.0]}, 'n_call_callback_fun': 0, 'n_call_nlp_f': 3, 'n_call_nlp_g': 3, 'n_call_nlp_grad': 0, 'n_call_nlp_grad_f': 4, 'n_call_nlp_hess_l': 2, 'n_call_nlp_jac_g': 4, 'n_call_total': 1, 'return_status': 'Maximum_Iterations_Exceeded', 'success': False, 't_proc_callback_fun': 0.0, 't_proc_nlp_f': 4.7e-05, 't_proc_nlp_g': 0.0052640000000000004, 't_proc_nlp_grad': 0.0, 't_proc_nlp_grad_f': 9.6e-05, 't_proc_nlp_hess_l': 1.456362, 't_proc_nlp_jac_g': 0.139212, 't_proc_total': 1.604704, 't_wall_callback_fun': 0.0, 't_wall_nlp_f': 4.3973e-05, 't_wall_nlp_g': 0.005266004, 't_wall_nlp_grad': 0.0, 't_wall_nlp_grad_f': 9.5169e-05, 't_wall_nlp_hess_l': 1.456332811, 't_wall_nlp_jac_g': 0.139238145, 't_wall_total': 1.604646503, 'unified_return_status': 'SOLVER_RET_LIMITED'}\n",
      "Solver fails under iter 2 return last iteration results!\n",
      "Setting the init for x\n",
      "Settiing the init for u\n",
      "      solver  :   t_proc      (avg)   t_wall      (avg)    n_eval\n",
      "       nlp_f  |  48.00us ( 16.00us)  46.03us ( 15.34us)         3\n",
      "       nlp_g  |   5.65ms (  1.88ms)   5.65ms (  1.88ms)         3\n",
      "  nlp_grad_f  |  94.00us ( 23.50us)  93.94us ( 23.48us)         4\n",
      "  nlp_hess_l  |   1.43 s (717.06ms)   1.43 s (717.08ms)         2\n",
      "   nlp_jac_g  | 138.94ms ( 34.73ms) 138.97ms ( 34.74ms)         4\n",
      "       total  |   1.58 s (  1.58 s)   1.58 s (  1.58 s)         1\n",
      "{'iter_count': 2, 'iterations': {'alpha_du': [0.0, 1.0, 0.9793496735550882], 'alpha_pr': [0.0, 1.0, 1.0], 'd_norm': [0.0, 0.1576774385699761, 0.18682702992847225], 'inf_du': [0.21037693418668685, 0.18757930623643881, 0.003712728722701897], 'inf_pr': [0.02841146338565359, 0.00031688581542077543, 8.498021991887317e-05], 'mu': [0.1, 0.1, 0.002828427124746191], 'obj': [114.57879972497273, 115.27689517089391, 114.55693941063225], 'regularization_size': [0.0, 0.0, 0.0]}, 'n_call_callback_fun': 0, 'n_call_nlp_f': 3, 'n_call_nlp_g': 3, 'n_call_nlp_grad': 0, 'n_call_nlp_grad_f': 4, 'n_call_nlp_hess_l': 2, 'n_call_nlp_jac_g': 4, 'n_call_total': 1, 'return_status': 'Maximum_Iterations_Exceeded', 'success': False, 't_proc_callback_fun': 0.0, 't_proc_nlp_f': 4.8e-05, 't_proc_nlp_g': 0.00565, 't_proc_nlp_grad': 0.0, 't_proc_nlp_grad_f': 9.4e-05, 't_proc_nlp_hess_l': 1.434129, 't_proc_nlp_jac_g': 0.13893899999999998, 't_proc_total': 1.58272, 't_wall_callback_fun': 0.0, 't_wall_nlp_f': 4.6028e-05, 't_wall_nlp_g': 0.005654166, 't_wall_nlp_grad': 0.0, 't_wall_nlp_grad_f': 9.3936e-05, 't_wall_nlp_hess_l': 1.4341613880000001, 't_wall_nlp_jac_g': 0.138969284, 't_wall_total': 1.582720323, 'unified_return_status': 'SOLVER_RET_LIMITED'}\n",
      "Solver fails under iter 2 return last iteration results!\n",
      "Setting the init for x\n",
      "Settiing the init for u\n",
      "      solver  :   t_proc      (avg)   t_wall      (avg)    n_eval\n",
      "       nlp_f  |  46.00us ( 15.33us)  44.37us ( 14.79us)         3\n",
      "       nlp_g  |   5.32ms (  1.77ms)   5.32ms (  1.77ms)         3\n",
      "  nlp_grad_f  |  98.00us ( 24.50us)  98.55us ( 24.64us)         4\n",
      "  nlp_hess_l  |   1.46 s (729.04ms)   1.46 s (729.09ms)         2\n",
      "   nlp_jac_g  | 138.96ms ( 34.74ms) 138.99ms ( 34.75ms)         4\n",
      "       total  |   1.61 s (  1.61 s)   1.61 s (  1.61 s)         1\n",
      "{'iter_count': 2, 'iterations': {'alpha_du': [0.0, 1.0, 0.9886037641489703], 'alpha_pr': [0.0, 1.0, 1.0], 'd_norm': [0.0, 0.15892072027914117, 0.13646554368195787], 'inf_du': [0.24382695245670738, 0.1718291665570475, 0.0019587037972987886], 'inf_pr': [0.028044407214137923, 0.0003166946041279761, 0.0001064994974457889], 'mu': [0.1, 0.1, 0.002828427124746191], 'obj': [108.65064190230572, 109.25209089978905, 108.63052561104304], 'regularization_size': [0.0, 0.0, 0.0]}, 'n_call_callback_fun': 0, 'n_call_nlp_f': 3, 'n_call_nlp_g': 3, 'n_call_nlp_grad': 0, 'n_call_nlp_grad_f': 4, 'n_call_nlp_hess_l': 2, 'n_call_nlp_jac_g': 4, 'n_call_total': 1, 'return_status': 'Maximum_Iterations_Exceeded', 'success': False, 't_proc_callback_fun': 0.0, 't_proc_nlp_f': 4.6e-05, 't_proc_nlp_g': 0.005320999999999999, 't_proc_nlp_grad': 0.0, 't_proc_nlp_grad_f': 9.8e-05, 't_proc_nlp_hess_l': 1.45808, 't_proc_nlp_jac_g': 0.138957, 't_proc_total': 1.606275, 't_wall_callback_fun': 0.0, 't_wall_nlp_f': 4.4372e-05, 't_wall_nlp_g': 0.005322563000000001, 't_wall_nlp_grad': 0.0, 't_wall_nlp_grad_f': 9.855399999999999e-05, 't_wall_nlp_hess_l': 1.458172171, 't_wall_nlp_jac_g': 0.13899111400000003, 't_wall_total': 1.606350145, 'unified_return_status': 'SOLVER_RET_LIMITED'}\n",
      "Solver fails under iter 2 return last iteration results!\n",
      "Setting the init for x\n",
      "Settiing the init for u\n",
      "      solver  :   t_proc      (avg)   t_wall      (avg)    n_eval\n",
      "       nlp_f  |  45.00us ( 15.00us)  43.60us ( 14.53us)         3\n",
      "       nlp_g  |   5.37ms (  1.79ms)   5.37ms (  1.79ms)         3\n",
      "  nlp_grad_f  |  89.00us ( 22.25us)  90.21us ( 22.55us)         4\n",
      "  nlp_hess_l  |   1.46 s (728.11ms)   1.46 s (728.12ms)         2\n",
      "   nlp_jac_g  | 138.37ms ( 34.59ms) 138.47ms ( 34.62ms)         4\n",
      "       total  |   1.60 s (  1.60 s)   1.60 s (  1.60 s)         1\n",
      "{'iter_count': 2, 'iterations': {'alpha_du': [0.0, 1.0, 0.9934334935051314], 'alpha_pr': [0.0, 1.0, 1.0], 'd_norm': [0.0, 0.16015501646426258, 0.11473414539704829], 'inf_du': [0.28862545863342604, 0.142206411275124, 0.0009866319649262378], 'inf_pr': [0.027465298516588632, 0.00031823873326830565, 0.00014648190205301947], 'mu': [0.1, 0.1, 0.002828427124746191], 'obj': [103.81920852117325, 104.30547142315638, 103.79902824065535], 'regularization_size': [0.0, 0.0, 0.0]}, 'n_call_callback_fun': 0, 'n_call_nlp_f': 3, 'n_call_nlp_g': 3, 'n_call_nlp_grad': 0, 'n_call_nlp_grad_f': 4, 'n_call_nlp_hess_l': 2, 'n_call_nlp_jac_g': 4, 'n_call_total': 1, 'return_status': 'Maximum_Iterations_Exceeded', 'success': False, 't_proc_callback_fun': 0.0, 't_proc_nlp_f': 4.4999999999999996e-05, 't_proc_nlp_g': 0.005365, 't_proc_nlp_grad': 0.0, 't_proc_nlp_grad_f': 8.9e-05, 't_proc_nlp_hess_l': 1.456222, 't_proc_nlp_jac_g': 0.138367, 't_proc_total': 1.603864, 't_wall_callback_fun': 0.0, 't_wall_nlp_f': 4.3595000000000005e-05, 't_wall_nlp_g': 0.005366777, 't_wall_nlp_grad': 0.0, 't_wall_nlp_grad_f': 9.0211e-05, 't_wall_nlp_hess_l': 1.456246728, 't_wall_nlp_jac_g': 0.138473821, 't_wall_total': 1.603940826, 'unified_return_status': 'SOLVER_RET_LIMITED'}\n",
      "Solver fails under iter 2 return last iteration results!\n",
      "Setting the init for x\n",
      "Settiing the init for u\n",
      "      solver  :   t_proc      (avg)   t_wall      (avg)    n_eval\n",
      "       nlp_f  |  46.00us ( 15.33us)  43.05us ( 14.35us)         3\n",
      "       nlp_g  |   5.23ms (  1.74ms)   5.23ms (  1.74ms)         3\n",
      "  nlp_grad_f  |  95.00us ( 23.75us)  94.95us ( 23.74us)         4\n",
      "  nlp_hess_l  |   1.45 s (727.20ms)   1.45 s (727.18ms)         2\n",
      "   nlp_jac_g  | 138.40ms ( 34.60ms) 138.44ms ( 34.61ms)         4\n",
      "       total  |   1.60 s (  1.60 s)   1.60 s (  1.60 s)         1\n",
      "{'iter_count': 2, 'iterations': {'alpha_du': [0.0, 1.0, 0.9948336305481479], 'alpha_pr': [0.0, 1.0, 1.0], 'd_norm': [0.0, 0.16130432696764344, 0.12469326782685909], 'inf_du': [0.3201548569809458, 0.09617289706166687, 0.0013075870641593434], 'inf_pr': [0.02651960882315496, 0.00031943473140838563, 0.0002102957009110784], 'mu': [0.1, 0.1, 0.002828427124746191], 'obj': [99.96508216257699, 100.32547248568639, 99.94412762411258], 'regularization_size': [0.0, 0.0, 0.0]}, 'n_call_callback_fun': 0, 'n_call_nlp_f': 3, 'n_call_nlp_g': 3, 'n_call_nlp_grad': 0, 'n_call_nlp_grad_f': 4, 'n_call_nlp_hess_l': 2, 'n_call_nlp_jac_g': 4, 'n_call_total': 1, 'return_status': 'Maximum_Iterations_Exceeded', 'success': False, 't_proc_callback_fun': 0.0, 't_proc_nlp_f': 4.6e-05, 't_proc_nlp_g': 0.005234, 't_proc_nlp_grad': 0.0, 't_proc_nlp_grad_f': 9.5e-05, 't_proc_nlp_hess_l': 1.4544030000000001, 't_proc_nlp_jac_g': 0.138404, 't_proc_total': 1.60199, 't_wall_callback_fun': 0.0, 't_wall_nlp_f': 4.305e-05, 't_wall_nlp_g': 0.005231553, 't_wall_nlp_grad': 0.0, 't_wall_nlp_grad_f': 9.494800000000001e-05, 't_wall_nlp_hess_l': 1.45436824, 't_wall_nlp_jac_g': 0.138440682, 't_wall_total': 1.601938534, 'unified_return_status': 'SOLVER_RET_LIMITED'}\n",
      "Solver fails under iter 2 return last iteration results!\n",
      "Setting the init for x\n",
      "Settiing the init for u\n",
      "      solver  :   t_proc      (avg)   t_wall      (avg)    n_eval\n",
      "       nlp_f  |  50.00us ( 16.67us)  45.16us ( 15.05us)         3\n",
      "       nlp_g  |   5.34ms (  1.78ms)   5.35ms (  1.78ms)         3\n",
      "  nlp_grad_f  |  88.00us ( 22.00us)  88.21us ( 22.05us)         4\n",
      "  nlp_hess_l  |   1.46 s (732.03ms)   1.46 s (732.32ms)         2\n",
      "   nlp_jac_g  | 138.87ms ( 34.72ms) 138.97ms ( 34.74ms)         4\n",
      "       total  |   1.61 s (  1.61 s)   1.61 s (  1.61 s)         1\n",
      "{'iter_count': 2, 'iterations': {'alpha_du': [0.0, 1.0, 0.9948842864434293], 'alpha_pr': [0.0, 1.0, 1.0], 'd_norm': [0.0, 0.16183058752276666, 0.14124667408496336], 'inf_du': [0.3030546650642709, 0.044262929590087374, 0.0018017045045091162], 'inf_pr': [0.024786600849491247, 0.0003177476706841542, 0.0003140416262611967], 'mu': [0.1, 0.1, 0.002828427124746191], 'obj': [96.96601354200352, 97.20319701863217, 96.94382337969706], 'regularization_size': [0.0, 0.0, 0.0]}, 'n_call_callback_fun': 0, 'n_call_nlp_f': 3, 'n_call_nlp_g': 3, 'n_call_nlp_grad': 0, 'n_call_nlp_grad_f': 4, 'n_call_nlp_hess_l': 2, 'n_call_nlp_jac_g': 4, 'n_call_total': 1, 'return_status': 'Maximum_Iterations_Exceeded', 'success': False, 't_proc_callback_fun': 0.0, 't_proc_nlp_f': 4.9999999999999996e-05, 't_proc_nlp_g': 0.005345, 't_proc_nlp_grad': 0.0, 't_proc_nlp_grad_f': 8.8e-05, 't_proc_nlp_hess_l': 1.464065, 't_proc_nlp_jac_g': 0.138868, 't_proc_total': 1.612145, 't_wall_callback_fun': 0.0, 't_wall_nlp_f': 4.5159000000000006e-05, 't_wall_nlp_g': 0.005347782, 't_wall_nlp_grad': 0.0, 't_wall_nlp_grad_f': 8.820600000000002e-05, 't_wall_nlp_hess_l': 1.464640995, 't_wall_nlp_jac_g': 0.13896764, 't_wall_total': 1.612760447, 'unified_return_status': 'SOLVER_RET_LIMITED'}\n",
      "Solver fails under iter 2 return last iteration results!\n",
      "Setting the init for x\n",
      "Settiing the init for u\n",
      "      solver  :   t_proc      (avg)   t_wall      (avg)    n_eval\n",
      "       nlp_f  |  44.00us ( 14.67us)  42.32us ( 14.11us)         3\n",
      "       nlp_g  |   5.26ms (  1.75ms)   5.27ms (  1.76ms)         3\n",
      "  nlp_grad_f  |  96.00us ( 24.00us)  96.68us ( 24.17us)         4\n",
      "  nlp_hess_l  |   1.45 s (724.53ms)   1.45 s (724.70ms)         2\n",
      "   nlp_jac_g  | 134.77ms ( 33.69ms) 134.83ms ( 33.71ms)         4\n",
      "       total  |   1.59 s (  1.59 s)   1.59 s (  1.59 s)         1\n",
      "{'iter_count': 2, 'iterations': {'alpha_du': [0.0, 1.0, 0.9900668804820021], 'alpha_pr': [0.0, 1.0, 1.0], 'd_norm': [0.0, 0.16121748065940772, 0.16128189033944904], 'inf_du': [0.2287827565816182, 0.008163253512961433, 0.002530846447099777], 'inf_pr': [0.021311573364359848, 0.0003110753840211977, 0.0004917309951342763], 'mu': [0.1, 0.1, 0.002828427124746191], 'obj': [94.70620525228883, 94.83677083526977, 94.68226181584072], 'regularization_size': [0.0, 0.0, 0.0]}, 'n_call_callback_fun': 0, 'n_call_nlp_f': 3, 'n_call_nlp_g': 3, 'n_call_nlp_grad': 0, 'n_call_nlp_grad_f': 4, 'n_call_nlp_hess_l': 2, 'n_call_nlp_jac_g': 4, 'n_call_total': 1, 'return_status': 'Maximum_Iterations_Exceeded', 'success': False, 't_proc_callback_fun': 0.0, 't_proc_nlp_f': 4.4e-05, 't_proc_nlp_g': 0.005265, 't_proc_nlp_grad': 0.0, 't_proc_nlp_grad_f': 9.599999999999999e-05, 't_proc_nlp_hess_l': 1.449057, 't_proc_nlp_jac_g': 0.134772, 't_proc_total': 1.59292, 't_wall_callback_fun': 0.0, 't_wall_nlp_f': 4.2323e-05, 't_wall_nlp_g': 0.005271706, 't_wall_nlp_grad': 0.0, 't_wall_nlp_grad_f': 9.6681e-05, 't_wall_nlp_hess_l': 1.449394407, 't_wall_nlp_jac_g': 0.134831478, 't_wall_total': 1.593264142, 'unified_return_status': 'SOLVER_RET_LIMITED'}\n",
      "Solver fails under iter 2 return last iteration results!\n",
      "Setting the init for x\n",
      "Settiing the init for u\n",
      "      solver  :   t_proc      (avg)   t_wall      (avg)    n_eval\n",
      "       nlp_f  |  44.00us ( 14.67us)  42.23us ( 14.08us)         3\n",
      "       nlp_g  |   5.06ms (  1.69ms)   5.06ms (  1.69ms)         3\n",
      "  nlp_grad_f  |  89.00us ( 22.25us)  88.06us ( 22.02us)         4\n",
      "  nlp_hess_l  |   1.44 s (718.54ms)   1.44 s (718.74ms)         2\n",
      "   nlp_jac_g  | 133.55ms ( 33.39ms) 133.62ms ( 33.40ms)         4\n",
      "       total  |   1.58 s (  1.58 s)   1.58 s (  1.58 s)         1\n",
      "{'iter_count': 2, 'iterations': {'alpha_du': [0.0, 1.0, 0.9829116100669665], 'alpha_pr': [0.0, 1.0, 1.0], 'd_norm': [0.0, 0.15918776874596713, 0.18714762620745273], 'inf_du': [0.13309537228270574, 0.00393496356507228, 0.0037510693291501473], 'inf_pr': [0.013838835799777627, 0.0002987193131904764, 0.0008078843900574117], 'mu': [0.1, 0.1, 0.002828427124746191], 'obj': [93.07972160584781, 93.13065535831329, 93.05341996952268], 'regularization_size': [0.0, 0.0, 0.0]}, 'n_call_callback_fun': 0, 'n_call_nlp_f': 3, 'n_call_nlp_g': 3, 'n_call_nlp_grad': 0, 'n_call_nlp_grad_f': 4, 'n_call_nlp_hess_l': 2, 'n_call_nlp_jac_g': 4, 'n_call_total': 1, 'return_status': 'Maximum_Iterations_Exceeded', 'success': False, 't_proc_callback_fun': 0.0, 't_proc_nlp_f': 4.4e-05, 't_proc_nlp_g': 0.005056, 't_proc_nlp_grad': 0.0, 't_proc_nlp_grad_f': 8.9e-05, 't_proc_nlp_hess_l': 1.437087, 't_proc_nlp_jac_g': 0.133551, 't_proc_total': 1.579453, 't_wall_callback_fun': 0.0, 't_wall_nlp_f': 4.2229e-05, 't_wall_nlp_g': 0.005057593, 't_wall_nlp_grad': 0.0, 't_wall_nlp_grad_f': 8.8062e-05, 't_wall_nlp_hess_l': 1.437474544, 't_wall_nlp_jac_g': 0.133616639, 't_wall_total': 1.579851006, 'unified_return_status': 'SOLVER_RET_LIMITED'}\n",
      "Solver fails under iter 2 return last iteration results!\n",
      "Setting the init for x\n",
      "Settiing the init for u\n",
      "      solver  :   t_proc      (avg)   t_wall      (avg)    n_eval\n",
      "       nlp_f  |  47.00us ( 15.67us)  44.54us ( 14.85us)         3\n",
      "       nlp_g  |   5.04ms (  1.68ms)   5.04ms (  1.68ms)         3\n",
      "  nlp_grad_f  |  91.00us ( 22.75us)  90.74us ( 22.68us)         4\n",
      "  nlp_hess_l  |   1.44 s (720.82ms)   1.44 s (721.02ms)         2\n",
      "   nlp_jac_g  | 133.28ms ( 33.32ms) 133.35ms ( 33.34ms)         4\n",
      "       total  |   1.58 s (  1.58 s)   1.58 s (  1.58 s)         1\n",
      "{'iter_count': 2, 'iterations': {'alpha_du': [0.0, 1.0, 0.9735111668000712], 'alpha_pr': [0.0, 1.0, 1.0], 'd_norm': [0.0, 0.15597765436110628, 0.22264151571355892], 'inf_du': [0.05280065941939937, 0.001318748121246216, 0.0053066780611145115], 'inf_pr': [0.0008078843900574117, 0.0002821171783740084, 0.0013949767309633376], 'mu': [0.1, 0.1, 0.002828427124746191], 'obj': [91.99016536730552, 91.99213722996392, 91.960696830631], 'regularization_size': [0.0, 0.0, 0.0]}, 'n_call_callback_fun': 0, 'n_call_nlp_f': 3, 'n_call_nlp_g': 3, 'n_call_nlp_grad': 0, 'n_call_nlp_grad_f': 4, 'n_call_nlp_hess_l': 2, 'n_call_nlp_jac_g': 4, 'n_call_total': 1, 'return_status': 'Maximum_Iterations_Exceeded', 'success': False, 't_proc_callback_fun': 0.0, 't_proc_nlp_f': 4.7000000000000004e-05, 't_proc_nlp_g': 0.005036, 't_proc_nlp_grad': 0.0, 't_proc_nlp_grad_f': 9.099999999999999e-05, 't_proc_nlp_hess_l': 1.4416319999999998, 't_proc_nlp_jac_g': 0.13328099999999998, 't_proc_total': 1.583756, 't_wall_callback_fun': 0.0, 't_wall_nlp_f': 4.4543e-05, 't_wall_nlp_g': 0.005038859, 't_wall_nlp_grad': 0.0, 't_wall_nlp_grad_f': 9.0738e-05, 't_wall_nlp_hess_l': 1.4420381020000002, 't_wall_nlp_jac_g': 0.133349894, 't_wall_total': 1.584174222, 'unified_return_status': 'SOLVER_RET_LIMITED'}\n",
      "Solver fails under iter 2 return last iteration results!\n",
      "Setting the init for x\n",
      "Settiing the init for u\n",
      "      solver  :   t_proc      (avg)   t_wall      (avg)    n_eval\n",
      "       nlp_f  |  47.00us ( 15.67us)  44.36us ( 14.79us)         3\n",
      "       nlp_g  |   5.07ms (  1.69ms)   5.07ms (  1.69ms)         3\n",
      "  nlp_grad_f  |  86.00us ( 21.50us)  85.95us ( 21.49us)         4\n",
      "  nlp_hess_l  |   1.45 s (727.31ms)   1.46 s (727.59ms)         2\n",
      "   nlp_jac_g  | 132.93ms ( 33.23ms) 133.01ms ( 33.25ms)         4\n",
      "       total  |   1.60 s (  1.60 s)   1.60 s (  1.60 s)         1\n",
      "{'iter_count': 2, 'iterations': {'alpha_du': [0.0, 1.0, 0.9618014579289067], 'alpha_pr': [0.0, 1.0, 1.0], 'd_norm': [0.0, 0.15167366192726348, 0.2739041773167361], 'inf_du': [0.01648592636452766, 0.002681311747099402, 0.007801880671150174], 'inf_pr': [0.0013949767309633376, 0.0002619656220019806, 0.002509567639239818], 'mu': [0.1, 0.1, 0.002828427124746191], 'obj': [91.34819432273441, 91.32668375358418, 91.31373735740887], 'regularization_size': [0.0, 0.0, 0.0]}, 'n_call_callback_fun': 0, 'n_call_nlp_f': 3, 'n_call_nlp_g': 3, 'n_call_nlp_grad': 0, 'n_call_nlp_grad_f': 4, 'n_call_nlp_hess_l': 2, 'n_call_nlp_jac_g': 4, 'n_call_total': 1, 'return_status': 'Maximum_Iterations_Exceeded', 'success': False, 't_proc_callback_fun': 0.0, 't_proc_nlp_f': 4.7000000000000004e-05, 't_proc_nlp_g': 0.005067, 't_proc_nlp_grad': 0.0, 't_proc_nlp_grad_f': 8.6e-05, 't_proc_nlp_hess_l': 1.454622, 't_proc_nlp_jac_g': 0.132932, 't_proc_total': 1.5964, 't_wall_callback_fun': 0.0, 't_wall_nlp_f': 4.4356e-05, 't_wall_nlp_g': 0.005067569, 't_wall_nlp_grad': 0.0, 't_wall_nlp_grad_f': 8.5955e-05, 't_wall_nlp_hess_l': 1.455170448, 't_wall_nlp_jac_g': 0.133010014, 't_wall_total': 1.596971582, 'unified_return_status': 'SOLVER_RET_LIMITED'}\n",
      "Solver fails under iter 2 return last iteration results!\n",
      "Setting the init for x\n",
      "Settiing the init for u\n",
      "      solver  :   t_proc      (avg)   t_wall      (avg)    n_eval\n",
      "       nlp_f  |  49.00us ( 16.33us)  43.87us ( 14.62us)         3\n",
      "       nlp_g  |   5.29ms (  1.76ms)   5.30ms (  1.77ms)         3\n",
      "  nlp_grad_f  |  97.00us ( 24.25us)  96.92us ( 24.23us)         4\n",
      "  nlp_hess_l  |   1.46 s (729.80ms)   1.46 s (729.80ms)         2\n",
      "   nlp_jac_g  | 136.93ms ( 34.23ms) 136.90ms ( 34.23ms)         4\n",
      "       total  |   1.61 s (  1.61 s)   1.61 s (  1.61 s)         1\n",
      "{'iter_count': 2, 'iterations': {'alpha_du': [0.0, 1.0, 0.9494462885834326], 'alpha_pr': [0.0, 1.0, 1.0], 'd_norm': [0.0, 0.14633598545937798, 0.34587121337740645], 'inf_du': [0.016369330246127026, 0.0012234530352521755, 0.010723871543792729], 'inf_pr': [0.002509567639239818, 0.00023863335190954515, 0.00444243780224185], 'mu': [0.1, 0.1, 0.002828427124746191], 'obj': [91.0844933758896, 91.04935230707838, 91.03900302860679], 'regularization_size': [0.0, 0.0, 0.0]}, 'n_call_callback_fun': 0, 'n_call_nlp_f': 3, 'n_call_nlp_g': 3, 'n_call_nlp_grad': 0, 'n_call_nlp_grad_f': 4, 'n_call_nlp_hess_l': 2, 'n_call_nlp_jac_g': 4, 'n_call_total': 1, 'return_status': 'Maximum_Iterations_Exceeded', 'success': False, 't_proc_callback_fun': 0.0, 't_proc_nlp_f': 4.9e-05, 't_proc_nlp_g': 0.005294, 't_proc_nlp_grad': 0.0, 't_proc_nlp_grad_f': 9.7e-05, 't_proc_nlp_hess_l': 1.459598, 't_proc_nlp_jac_g': 0.136932, 't_proc_total': 1.605733, 't_wall_callback_fun': 0.0, 't_wall_nlp_f': 4.3867e-05, 't_wall_nlp_g': 0.005295154, 't_wall_nlp_grad': 0.0, 't_wall_nlp_grad_f': 9.691599999999999e-05, 't_wall_nlp_hess_l': 1.4595952300000001, 't_wall_nlp_jac_g': 0.136903303, 't_wall_total': 1.605637513, 'unified_return_status': 'SOLVER_RET_LIMITED'}\n",
      "Solver fails under iter 2 return last iteration results!\n",
      "Setting the init for x\n",
      "Settiing the init for u\n",
      "      solver  :   t_proc      (avg)   t_wall      (avg)    n_eval\n",
      "       nlp_f  |  47.00us ( 15.67us)  43.59us ( 14.53us)         3\n",
      "       nlp_g  |   5.26ms (  1.75ms)   5.27ms (  1.76ms)         3\n",
      "  nlp_grad_f  |  95.00us ( 23.75us)  94.20us ( 23.55us)         4\n",
      "  nlp_hess_l  |   1.44 s (721.50ms)   1.44 s (721.69ms)         2\n",
      "   nlp_jac_g  | 137.40ms ( 34.35ms) 137.45ms ( 34.36ms)         4\n",
      "       total  |   1.59 s (  1.59 s)   1.59 s (  1.59 s)         1\n",
      "{'iter_count': 2, 'iterations': {'alpha_du': [0.0, 1.0, 0.9406172276439886], 'alpha_pr': [0.0, 1.0, 1.0], 'd_norm': [0.0, 0.14003097153105207, 0.42548706090568483], 'inf_du': [0.016061708895674043, 0.001161564175790053, 0.013908307338403425], 'inf_pr': [0.00444243780224185, 0.00021264931149067579, 0.0063524430560852885], 'mu': [0.1, 0.1, 0.002828427124746191], 'obj': [91.14296898724837, 91.08401326717592, 91.06650856277281], 'regularization_size': [0.0, 0.0, 0.0]}, 'n_call_callback_fun': 0, 'n_call_nlp_f': 3, 'n_call_nlp_g': 3, 'n_call_nlp_grad': 0, 'n_call_nlp_grad_f': 4, 'n_call_nlp_hess_l': 2, 'n_call_nlp_jac_g': 4, 'n_call_total': 1, 'return_status': 'Maximum_Iterations_Exceeded', 'success': False, 't_proc_callback_fun': 0.0, 't_proc_nlp_f': 4.7e-05, 't_proc_nlp_g': 0.005265, 't_proc_nlp_grad': 0.0, 't_proc_nlp_grad_f': 9.5e-05, 't_proc_nlp_hess_l': 1.4429910000000001, 't_proc_nlp_jac_g': 0.1374, 't_proc_total': 1.589528, 't_wall_callback_fun': 0.0, 't_wall_nlp_f': 4.3585000000000004e-05, 't_wall_nlp_g': 0.005266894, 't_wall_nlp_grad': 0.0, 't_wall_nlp_grad_f': 9.4196e-05, 't_wall_nlp_hess_l': 1.443377158, 't_wall_nlp_jac_g': 0.137446074, 't_wall_total': 1.589912899, 'unified_return_status': 'SOLVER_RET_LIMITED'}\n",
      "Solver fails under iter 2 return last iteration results!\n",
      "Setting the init for x\n",
      "Settiing the init for u\n",
      "      solver  :   t_proc      (avg)   t_wall      (avg)    n_eval\n",
      "       nlp_f  |  48.00us ( 16.00us)  45.03us ( 15.01us)         3\n",
      "       nlp_g  |   5.29ms (  1.77ms)   5.30ms (  1.77ms)         3\n",
      "  nlp_grad_f  |  89.00us ( 22.25us)  88.40us ( 22.10us)         4\n",
      "  nlp_hess_l  |   1.46 s (728.64ms)   1.46 s (728.90ms)         2\n",
      "   nlp_jac_g  | 138.83ms ( 34.71ms) 138.89ms ( 34.72ms)         4\n",
      "       total  |   1.61 s (  1.61 s)   1.61 s (  1.61 s)         1\n",
      "{'iter_count': 2, 'iterations': {'alpha_du': [0.0, 1.0, 0.937092512866559], 'alpha_pr': [0.0, 1.0, 1.0], 'd_norm': [0.0, 0.13219620010077238, 0.4513982448307593], 'inf_du': [0.015624531488216931, 0.0015134819547735212, 0.015393810244281436], 'inf_pr': [0.0063524430560852885, 0.0001830261624791163, 0.005949811966653673], 'mu': [0.1, 0.1, 0.002828427124746191], 'obj': [91.24367411565494, 91.15602671368131, 91.10882747522676], 'regularization_size': [0.0, 0.0, 0.0]}, 'n_call_callback_fun': 0, 'n_call_nlp_f': 3, 'n_call_nlp_g': 3, 'n_call_nlp_grad': 0, 'n_call_nlp_grad_f': 4, 'n_call_nlp_hess_l': 2, 'n_call_nlp_jac_g': 4, 'n_call_total': 1, 'return_status': 'Maximum_Iterations_Exceeded', 'success': False, 't_proc_callback_fun': 0.0, 't_proc_nlp_f': 4.8e-05, 't_proc_nlp_g': 0.005295, 't_proc_nlp_grad': 0.0, 't_proc_nlp_grad_f': 8.9e-05, 't_proc_nlp_hess_l': 1.457281, 't_proc_nlp_jac_g': 0.138835, 't_proc_total': 1.605373, 't_wall_callback_fun': 0.0, 't_wall_nlp_f': 4.5027e-05, 't_wall_nlp_g': 0.005301562, 't_wall_nlp_grad': 0.0, 't_wall_nlp_grad_f': 8.8403e-05, 't_wall_nlp_hess_l': 1.457795161, 't_wall_nlp_jac_g': 0.138891074, 't_wall_total': 1.605896566, 'unified_return_status': 'SOLVER_RET_LIMITED'}\n",
      "Solver fails under iter 2 return last iteration results!\n",
      "Setting the init for x\n",
      "Settiing the init for u\n",
      "      solver  :   t_proc      (avg)   t_wall      (avg)    n_eval\n",
      "       nlp_f  |  42.00us ( 14.00us)  41.01us ( 13.67us)         3\n",
      "       nlp_g  |   5.25ms (  1.75ms)   5.25ms (  1.75ms)         3\n",
      "  nlp_grad_f  |  94.00us ( 23.50us)  94.48us ( 23.62us)         4\n",
      "  nlp_hess_l  |   1.44 s (721.87ms)   1.44 s (722.14ms)         2\n",
      "   nlp_jac_g  | 138.27ms ( 34.57ms) 138.34ms ( 34.59ms)         4\n",
      "       total  |   1.59 s (  1.59 s)   1.59 s (  1.59 s)         1\n",
      "{'iter_count': 2, 'iterations': {'alpha_du': [0.0, 1.0, 0.9375026271939195], 'alpha_pr': [0.0, 1.0, 1.0], 'd_norm': [0.0, 0.12234719964710064, 0.4113408793403581], 'inf_du': [0.015044065564159576, 0.0016504417836831209, 0.012411586098087013], 'inf_pr': [0.005949811966653673, 0.00019064979958116623, 0.004633274756145944], 'mu': [0.1, 0.1, 0.002828427124746191], 'obj': [91.28976691932466, 91.20334480822324, 91.11993640155396], 'regularization_size': [0.0, 0.0, 0.0]}, 'n_call_callback_fun': 0, 'n_call_nlp_f': 3, 'n_call_nlp_g': 3, 'n_call_nlp_grad': 0, 'n_call_nlp_grad_f': 4, 'n_call_nlp_hess_l': 2, 'n_call_nlp_jac_g': 4, 'n_call_total': 1, 'return_status': 'Maximum_Iterations_Exceeded', 'success': False, 't_proc_callback_fun': 0.0, 't_proc_nlp_f': 4.2e-05, 't_proc_nlp_g': 0.005246, 't_proc_nlp_grad': 0.0, 't_proc_nlp_grad_f': 9.400000000000001e-05, 't_proc_nlp_hess_l': 1.4437470000000001, 't_proc_nlp_jac_g': 0.138273, 't_proc_total': 1.591172, 't_wall_callback_fun': 0.0, 't_wall_nlp_f': 4.1009e-05, 't_wall_nlp_g': 0.005249593, 't_wall_nlp_grad': 0.0, 't_wall_nlp_grad_f': 9.4479e-05, 't_wall_nlp_hess_l': 1.444284444, 't_wall_nlp_jac_g': 0.138340393, 't_wall_total': 1.591719462, 'unified_return_status': 'SOLVER_RET_LIMITED'}\n",
      "Solver fails under iter 2 return last iteration results!\n",
      "Setting the init for x\n",
      "Settiing the init for u\n",
      "      solver  :   t_proc      (avg)   t_wall      (avg)    n_eval\n",
      "       nlp_f  |  47.00us ( 15.67us)  43.89us ( 14.63us)         3\n",
      "       nlp_g  |   5.08ms (  1.69ms)   5.08ms (  1.69ms)         3\n",
      "  nlp_grad_f  | 107.00us ( 26.75us) 107.36us ( 26.84us)         4\n",
      "  nlp_hess_l  |   1.46 s (728.44ms)   1.46 s (728.46ms)         2\n",
      "   nlp_jac_g  | 141.63ms ( 35.41ms) 141.68ms ( 35.42ms)         4\n",
      "       total  |   1.61 s (  1.61 s)   1.61 s (  1.61 s)         1\n",
      "{'iter_count': 2, 'iterations': {'alpha_du': [0.0, 1.0, 0.9469504984939726], 'alpha_pr': [0.0, 1.0, 1.0], 'd_norm': [0.0, 0.11212953363440531, 0.35653112956076716], 'inf_du': [0.01578297467021629, 0.0015281575939942726, 0.009915364344013855], 'inf_pr': [0.004633274756145944, 0.00023227823855309637, 0.003848150920855886], 'mu': [0.1, 0.1, 0.002828427124746191], 'obj': [91.2820936726331, 91.23910895581344, 91.1358983483893], 'regularization_size': [0.0, 0.0, 0.0]}, 'n_call_callback_fun': 0, 'n_call_nlp_f': 3, 'n_call_nlp_g': 3, 'n_call_nlp_grad': 0, 'n_call_nlp_grad_f': 4, 'n_call_nlp_hess_l': 2, 'n_call_nlp_jac_g': 4, 'n_call_total': 1, 'return_status': 'Maximum_Iterations_Exceeded', 'success': False, 't_proc_callback_fun': 0.0, 't_proc_nlp_f': 4.7000000000000004e-05, 't_proc_nlp_g': 0.005082000000000001, 't_proc_nlp_grad': 0.0, 't_proc_nlp_grad_f': 0.00010699999999999999, 't_proc_nlp_hess_l': 1.456886, 't_proc_nlp_jac_g': 0.141634, 't_proc_total': 1.607469, 't_wall_callback_fun': 0.0, 't_wall_nlp_f': 4.3891000000000004e-05, 't_wall_nlp_g': 0.0050810460000000005, 't_wall_nlp_grad': 0.0, 't_wall_nlp_grad_f': 0.00010735799999999998, 't_wall_nlp_hess_l': 1.456927332, 't_wall_nlp_jac_g': 0.141679053, 't_wall_total': 1.607500789, 'unified_return_status': 'SOLVER_RET_LIMITED'}\n",
      "Solver fails under iter 2 return last iteration results!\n",
      "Setting the init for x\n",
      "Settiing the init for u\n",
      "      solver  :   t_proc      (avg)   t_wall      (avg)    n_eval\n",
      "       nlp_f  |  50.00us ( 16.67us)  46.37us ( 15.46us)         3\n",
      "       nlp_g  |   5.29ms (  1.76ms)   5.30ms (  1.77ms)         3\n",
      "  nlp_grad_f  |  97.00us ( 24.25us)  96.08us ( 24.02us)         4\n",
      "  nlp_hess_l  |   1.44 s (720.40ms)   1.44 s (720.40ms)         2\n",
      "   nlp_jac_g  | 137.46ms ( 34.36ms) 137.49ms ( 34.37ms)         4\n",
      "       total  |   1.59 s (  1.59 s)   1.59 s (  1.59 s)         1\n",
      "{'iter_count': 2, 'iterations': {'alpha_du': [0.0, 1.0, 0.9491288253236443], 'alpha_pr': [0.0, 1.0, 1.0], 'd_norm': [0.0, 0.10321476644946179, 0.3453022211598645], 'inf_du': [0.018826896586175125, 0.0012162959022524733, 0.007315723945717778], 'inf_pr': [0.003848150920855886, 0.0002481185416638443, 0.003470808173429152], 'mu': [0.1, 0.1, 0.002828427124746191], 'obj': [91.2655180994562, 91.26665703791285, 91.15108633479437], 'regularization_size': [0.0, 0.0, 0.0]}, 'n_call_callback_fun': 0, 'n_call_nlp_f': 3, 'n_call_nlp_g': 3, 'n_call_nlp_grad': 0, 'n_call_nlp_grad_f': 4, 'n_call_nlp_hess_l': 2, 'n_call_nlp_jac_g': 4, 'n_call_total': 1, 'return_status': 'Maximum_Iterations_Exceeded', 'success': False, 't_proc_callback_fun': 0.0, 't_proc_nlp_f': 4.9999999999999996e-05, 't_proc_nlp_g': 0.005293, 't_proc_nlp_grad': 0.0, 't_proc_nlp_grad_f': 9.7e-05, 't_proc_nlp_hess_l': 1.440806, 't_proc_nlp_jac_g': 0.137457, 't_proc_total': 1.58745, 't_wall_callback_fun': 0.0, 't_wall_nlp_f': 4.6374e-05, 't_wall_nlp_g': 0.005295957, 't_wall_nlp_grad': 0.0, 't_wall_nlp_grad_f': 9.6077e-05, 't_wall_nlp_hess_l': 1.440807828, 't_wall_nlp_jac_g': 0.137491748, 't_wall_total': 1.587426946, 'unified_return_status': 'SOLVER_RET_LIMITED'}\n",
      "Solver fails under iter 2 return last iteration results!\n",
      "Setting the init for x\n",
      "Settiing the init for u\n",
      "      solver  :   t_proc      (avg)   t_wall      (avg)    n_eval\n",
      "       nlp_f  |  47.00us ( 15.67us)  43.79us ( 14.60us)         3\n",
      "       nlp_g  |   5.28ms (  1.76ms)   5.28ms (  1.76ms)         3\n",
      "  nlp_grad_f  |  90.00us ( 22.50us)  90.05us ( 22.51us)         4\n",
      "  nlp_hess_l  |   1.44 s (719.59ms)   1.44 s (719.75ms)         2\n",
      "   nlp_jac_g  | 137.75ms ( 34.44ms) 137.81ms ( 34.45ms)         4\n",
      "       total  |   1.59 s (  1.59 s)   1.59 s (  1.59 s)         1\n",
      "{'iter_count': 2, 'iterations': {'alpha_du': [0.0, 1.0, 0.9515129691683482], 'alpha_pr': [0.0, 1.0, 1.0], 'd_norm': [0.0, 0.09584483007000112, 0.34596889442573514], 'inf_du': [0.021445961578407946, 0.0008648406256068775, 0.005831227261412941], 'inf_pr': [0.003470808173429152, 0.00025197833664081237, 0.0032424132488553248], 'mu': [0.1, 0.1, 0.002828427124746191], 'obj': [91.23055907897387, 91.26430301500992, 91.13732792766852], 'regularization_size': [0.0, 0.0, 0.0]}, 'n_call_callback_fun': 0, 'n_call_nlp_f': 3, 'n_call_nlp_g': 3, 'n_call_nlp_grad': 0, 'n_call_nlp_grad_f': 4, 'n_call_nlp_hess_l': 2, 'n_call_nlp_jac_g': 4, 'n_call_total': 1, 'return_status': 'Maximum_Iterations_Exceeded', 'success': False, 't_proc_callback_fun': 0.0, 't_proc_nlp_f': 4.7000000000000004e-05, 't_proc_nlp_g': 0.005275, 't_proc_nlp_grad': 0.0, 't_proc_nlp_grad_f': 8.999999999999999e-05, 't_proc_nlp_hess_l': 1.4391850000000002, 't_proc_nlp_jac_g': 0.137745, 't_proc_total': 1.586063, 't_wall_callback_fun': 0.0, 't_wall_nlp_f': 4.3792000000000004e-05, 't_wall_nlp_g': 0.005276576, 't_wall_nlp_grad': 0.0, 't_wall_nlp_grad_f': 9.0053e-05, 't_wall_nlp_hess_l': 1.439498577, 't_wall_nlp_jac_g': 0.137808247, 't_wall_total': 1.586386397, 'unified_return_status': 'SOLVER_RET_LIMITED'}\n",
      "Solver fails under iter 2 return last iteration results!\n",
      "Setting the init for x\n",
      "Settiing the init for u\n",
      "      solver  :   t_proc      (avg)   t_wall      (avg)    n_eval\n",
      "       nlp_f  |  46.00us ( 15.33us)  44.16us ( 14.72us)         3\n",
      "       nlp_g  |   5.01ms (  1.67ms)   5.01ms (  1.67ms)         3\n",
      "  nlp_grad_f  |  95.00us ( 23.75us)  95.05us ( 23.76us)         4\n",
      "  nlp_hess_l  |   1.46 s (729.11ms)   1.46 s (729.12ms)         2\n",
      "   nlp_jac_g  | 133.13ms ( 33.28ms) 133.17ms ( 33.29ms)         4\n",
      "       total  |   1.60 s (  1.60 s)   1.60 s (  1.60 s)         1\n",
      "{'iter_count': 2, 'iterations': {'alpha_du': [0.0, 0.9995076312659498, 0.9437305465139568], 'alpha_pr': [0.0, 1.0, 1.0], 'd_norm': [0.0, 0.09894837429892044, 0.34351563090290804], 'inf_du': [0.02368273955711757, 0.0015931346994511042, 0.006307319469830208], 'inf_pr': [0.0032424132488553248, 0.00024732484096601226, 0.002961830096588347], 'mu': [0.1, 0.1, 0.002828427124746191], 'obj': [91.14252557060769, 91.20146519371043, 91.06368618940141], 'regularization_size': [0.0, 0.0, 0.0]}, 'n_call_callback_fun': 0, 'n_call_nlp_f': 3, 'n_call_nlp_g': 3, 'n_call_nlp_grad': 0, 'n_call_nlp_grad_f': 4, 'n_call_nlp_hess_l': 2, 'n_call_nlp_jac_g': 4, 'n_call_total': 1, 'return_status': 'Maximum_Iterations_Exceeded', 'success': False, 't_proc_callback_fun': 0.0, 't_proc_nlp_f': 4.6e-05, 't_proc_nlp_g': 0.005007, 't_proc_nlp_grad': 0.0, 't_proc_nlp_grad_f': 9.499999999999999e-05, 't_proc_nlp_hess_l': 1.458221, 't_proc_nlp_jac_g': 0.133135, 't_proc_total': 1.600277, 't_wall_callback_fun': 0.0, 't_wall_nlp_f': 4.416e-05, 't_wall_nlp_g': 0.005006265, 't_wall_nlp_grad': 0.0, 't_wall_nlp_grad_f': 9.5051e-05, 't_wall_nlp_hess_l': 1.4582357570000002, 't_wall_nlp_jac_g': 0.133172629, 't_wall_total': 1.600272208, 'unified_return_status': 'SOLVER_RET_LIMITED'}\n",
      "Solver fails under iter 2 return last iteration results!\n",
      "Setting the init for x\n",
      "Settiing the init for u\n",
      "      solver  :   t_proc      (avg)   t_wall      (avg)    n_eval\n",
      "       nlp_f  |  51.00us ( 17.00us)  44.07us ( 14.69us)         3\n",
      "       nlp_g  |   5.31ms (  1.77ms)   5.31ms (  1.77ms)         3\n",
      "  nlp_grad_f  |  99.00us ( 24.75us)  98.88us ( 24.72us)         4\n",
      "  nlp_hess_l  |   1.44 s (721.98ms)   1.44 s (721.95ms)         2\n",
      "   nlp_jac_g  | 138.51ms ( 34.63ms) 138.55ms ( 34.64ms)         4\n",
      "       total  |   1.59 s (  1.59 s)   1.59 s (  1.59 s)         1\n",
      "{'iter_count': 2, 'iterations': {'alpha_du': [0.0, 0.9754980058768091, 1.0], 'alpha_pr': [0.0, 1.0, 1.0], 'd_norm': [0.0, 0.12042666737933097, 0.21747154194175208], 'inf_du': [0.02552336132725941, 0.024867246815292954, 0.004200059548133295], 'inf_pr': [0.002961830096588347, 0.0002350927814838144, 0.0011966903027449405], 'mu': [0.1, 0.1, 0.020000000000000004], 'obj': [90.96442324754348, 91.04395532535649, 91.01104557953043], 'regularization_size': [0.0, 0.0, 0.0]}, 'n_call_callback_fun': 0, 'n_call_nlp_f': 3, 'n_call_nlp_g': 3, 'n_call_nlp_grad': 0, 'n_call_nlp_grad_f': 4, 'n_call_nlp_hess_l': 2, 'n_call_nlp_jac_g': 4, 'n_call_total': 1, 'return_status': 'Maximum_Iterations_Exceeded', 'success': False, 't_proc_callback_fun': 0.0, 't_proc_nlp_f': 5.099999999999999e-05, 't_proc_nlp_g': 0.005309, 't_proc_nlp_grad': 0.0, 't_proc_nlp_grad_f': 9.9e-05, 't_proc_nlp_hess_l': 1.443962, 't_proc_nlp_jac_g': 0.138512, 't_proc_total': 1.591665, 't_wall_callback_fun': 0.0, 't_wall_nlp_f': 4.4067e-05, 't_wall_nlp_g': 0.005310769, 't_wall_nlp_grad': 0.0, 't_wall_nlp_grad_f': 9.8884e-05, 't_wall_nlp_hess_l': 1.443896654, 't_wall_nlp_jac_g': 0.138545804, 't_wall_total': 1.591579658, 'unified_return_status': 'SOLVER_RET_LIMITED'}\n",
      "Solver fails under iter 2 return last iteration results!\n",
      "Setting the init for x\n",
      "Settiing the init for u\n",
      "      solver  :   t_proc      (avg)   t_wall      (avg)    n_eval\n",
      "       nlp_f  |  45.00us ( 15.00us)  43.08us ( 14.36us)         3\n",
      "       nlp_g  |   5.30ms (  1.77ms)   5.30ms (  1.77ms)         3\n",
      "  nlp_grad_f  |  92.00us ( 23.00us)  92.07us ( 23.02us)         4\n",
      "  nlp_hess_l  |   1.46 s (728.80ms)   1.46 s (728.79ms)         2\n",
      "   nlp_jac_g  | 137.80ms ( 34.45ms) 137.82ms ( 34.46ms)         4\n",
      "       total  |   1.60 s (  1.60 s)   1.60 s (  1.60 s)         1\n",
      "{'iter_count': 2, 'iterations': {'alpha_du': [0.0, 0.9747153240571401, 0.9834402898043364], 'alpha_pr': [0.0, 1.0, 1.0], 'd_norm': [0.0, 0.13728422275584862, 0.24762761682360257], 'inf_du': [0.026552855359270308, 0.02568216922512212, 0.0051524937523808045], 'inf_pr': [0.0011966903027449405, 0.0001243363199445735, 0.001579735398013593], 'mu': [0.1, 0.1, 0.020000000000000004], 'obj': [90.81934383815927, 90.90967717721432, 90.80064665109133], 'regularization_size': [0.0, 0.0, 0.0]}, 'n_call_callback_fun': 0, 'n_call_nlp_f': 3, 'n_call_nlp_g': 3, 'n_call_nlp_grad': 0, 'n_call_nlp_grad_f': 4, 'n_call_nlp_hess_l': 2, 'n_call_nlp_jac_g': 4, 'n_call_total': 1, 'return_status': 'Maximum_Iterations_Exceeded', 'success': False, 't_proc_callback_fun': 0.0, 't_proc_nlp_f': 4.4999999999999996e-05, 't_proc_nlp_g': 0.005297, 't_proc_nlp_grad': 0.0, 't_proc_nlp_grad_f': 9.2e-05, 't_proc_nlp_hess_l': 1.4575930000000001, 't_proc_nlp_jac_g': 0.1378, 't_proc_total': 1.604584, 't_wall_callback_fun': 0.0, 't_wall_nlp_f': 4.3079e-05, 't_wall_nlp_g': 0.005300028, 't_wall_nlp_grad': 0.0, 't_wall_nlp_grad_f': 9.207300000000001e-05, 't_wall_nlp_hess_l': 1.45757239, 't_wall_nlp_jac_g': 0.13782227600000002, 't_wall_total': 1.604529767, 'unified_return_status': 'SOLVER_RET_LIMITED'}\n",
      "Solver fails under iter 2 return last iteration results!\n",
      "Setting the init for x\n",
      "Settiing the init for u\n",
      "      solver  :   t_proc      (avg)   t_wall      (avg)    n_eval\n",
      "       nlp_f  |  50.00us ( 16.67us)  46.43us ( 15.48us)         3\n",
      "       nlp_g  |   5.37ms (  1.79ms)   5.37ms (  1.79ms)         3\n",
      "  nlp_grad_f  | 101.00us ( 25.25us) 100.27us ( 25.07us)         4\n",
      "  nlp_hess_l  |   1.45 s (724.06ms)   1.45 s (724.03ms)         2\n",
      "   nlp_jac_g  | 137.43ms ( 34.36ms) 137.48ms ( 34.37ms)         4\n",
      "       total  |   1.59 s (  1.59 s)   1.59 s (  1.59 s)         1\n",
      "{'iter_count': 2, 'iterations': {'alpha_du': [0.0, 0.9740580299167241, 0.9181200294338262], 'alpha_pr': [0.0, 1.0, 1.0], 'd_norm': [0.0, 0.16410320003530973, 0.2840985695036113], 'inf_du': [0.03356369624775471, 0.026367550650620686, 0.014274346048479714], 'inf_pr': [0.001579735398013593, 8.473763160321557e-05, 0.0013024779081400872], 'mu': [0.1, 0.1, 0.020000000000000004], 'obj': [90.49746779634458, 90.57185707000276, 90.44943216340748], 'regularization_size': [0.0, 0.0, 0.0]}, 'n_call_callback_fun': 0, 'n_call_nlp_f': 3, 'n_call_nlp_g': 3, 'n_call_nlp_grad': 0, 'n_call_nlp_grad_f': 4, 'n_call_nlp_hess_l': 2, 'n_call_nlp_jac_g': 4, 'n_call_total': 1, 'return_status': 'Maximum_Iterations_Exceeded', 'success': False, 't_proc_callback_fun': 0.0, 't_proc_nlp_f': 4.9999999999999996e-05, 't_proc_nlp_g': 0.005367, 't_proc_nlp_grad': 0.0, 't_proc_nlp_grad_f': 0.00010099999999999999, 't_proc_nlp_hess_l': 1.4481190000000002, 't_proc_nlp_jac_g': 0.137431, 't_proc_total': 1.594884, 't_wall_callback_fun': 0.0, 't_wall_nlp_f': 4.6426e-05, 't_wall_nlp_g': 0.005367991000000001, 't_wall_nlp_grad': 0.0, 't_wall_nlp_grad_f': 0.000100272, 't_wall_nlp_hess_l': 1.448052509, 't_wall_nlp_jac_g': 0.137481153, 't_wall_total': 1.594812717, 'unified_return_status': 'SOLVER_RET_LIMITED'}\n",
      "Solver fails under iter 2 return last iteration results!\n",
      "Setting the init for x\n",
      "Settiing the init for u\n",
      "      solver  :   t_proc      (avg)   t_wall      (avg)    n_eval\n",
      "       nlp_f  |  48.00us ( 16.00us)  44.39us ( 14.80us)         3\n",
      "       nlp_g  |   5.35ms (  1.78ms)   5.36ms (  1.79ms)         3\n",
      "  nlp_grad_f  |  91.00us ( 22.75us)  90.74us ( 22.68us)         4\n",
      "  nlp_hess_l  |   1.45 s (724.14ms)   1.45 s (724.20ms)         2\n",
      "   nlp_jac_g  | 140.94ms ( 35.23ms) 140.98ms ( 35.25ms)         4\n",
      "       total  |   1.60 s (  1.60 s)   1.60 s (  1.60 s)         1\n",
      "{'iter_count': 2, 'iterations': {'alpha_du': [0.0, 0.9884781727890056, 0.7095084931318363], 'alpha_pr': [0.0, 1.0, 1.0], 'd_norm': [0.0, 0.10809336077750722, 0.26726211096724345], 'inf_du': [0.04074008157064897, 0.018665379391177628, 0.11771751238988232], 'inf_pr': [0.0013024779081400872, 0.00015539891198956823, 0.0006416633494121804], 'mu': [0.1, 0.1, 0.002828427124746191], 'obj': [90.03909442656804, 90.09442155272583, 89.94308831106507], 'regularization_size': [0.0, 0.0, 0.0]}, 'n_call_callback_fun': 0, 'n_call_nlp_f': 3, 'n_call_nlp_g': 3, 'n_call_nlp_grad': 0, 'n_call_nlp_grad_f': 4, 'n_call_nlp_hess_l': 2, 'n_call_nlp_jac_g': 4, 'n_call_total': 1, 'return_status': 'Maximum_Iterations_Exceeded', 'success': False, 't_proc_callback_fun': 0.0, 't_proc_nlp_f': 4.8e-05, 't_proc_nlp_g': 0.005347, 't_proc_nlp_grad': 0.0, 't_proc_nlp_grad_f': 9.099999999999999e-05, 't_proc_nlp_hess_l': 1.4482840000000001, 't_proc_nlp_jac_g': 0.140938, 't_proc_total': 1.598453, 't_wall_callback_fun': 0.0, 't_wall_nlp_f': 4.439300000000001e-05, 't_wall_nlp_g': 0.005357272, 't_wall_nlp_grad': 0.0, 't_wall_nlp_grad_f': 9.0735e-05, 't_wall_nlp_hess_l': 1.448396828, 't_wall_nlp_jac_g': 0.140982693, 't_wall_total': 1.59856194, 'unified_return_status': 'SOLVER_RET_LIMITED'}\n",
      "Solver fails under iter 2 return last iteration results!\n",
      "Setting the init for x\n",
      "Settiing the init for u\n",
      "      solver  :   t_proc      (avg)   t_wall      (avg)    n_eval\n",
      "       nlp_f  |  45.00us ( 15.00us)  43.74us ( 14.58us)         3\n",
      "       nlp_g  |   5.33ms (  1.78ms)   5.33ms (  1.78ms)         3\n",
      "  nlp_grad_f  |  86.00us ( 21.50us)  86.72us ( 21.68us)         4\n",
      "  nlp_hess_l  |   1.43 s (717.25ms)   1.43 s (717.18ms)         2\n",
      "   nlp_jac_g  | 136.60ms ( 34.15ms) 136.66ms ( 34.16ms)         4\n",
      "       total  |   1.58 s (  1.58 s)   1.58 s (  1.58 s)         1\n",
      "{'iter_count': 2, 'iterations': {'alpha_du': [0.0, 0.9918024151224263, 0.7414627455264439], 'alpha_pr': [0.0, 1.0, 1.0], 'd_norm': [0.0, 0.13158991867200023, 0.15305090179003994], 'inf_du': [0.04202163145177318, 0.019067198511164674, 0.14623460313994474], 'inf_pr': [0.0006416633494121804, 0.0003574729170527924, 0.00020999062646209765], 'mu': [0.1, 0.1, 0.002828427124746191], 'obj': [89.47545981275277, 89.52519747843117, 89.43756820390125], 'regularization_size': [0.0, 0.0, 0.0]}, 'n_call_callback_fun': 0, 'n_call_nlp_f': 3, 'n_call_nlp_g': 3, 'n_call_nlp_grad': 0, 'n_call_nlp_grad_f': 4, 'n_call_nlp_hess_l': 2, 'n_call_nlp_jac_g': 4, 'n_call_total': 1, 'return_status': 'Maximum_Iterations_Exceeded', 'success': False, 't_proc_callback_fun': 0.0, 't_proc_nlp_f': 4.5e-05, 't_proc_nlp_g': 0.005332, 't_proc_nlp_grad': 0.0, 't_proc_nlp_grad_f': 8.6e-05, 't_proc_nlp_hess_l': 1.434492, 't_proc_nlp_jac_g': 0.136599, 't_proc_total': 1.580169, 't_wall_callback_fun': 0.0, 't_wall_nlp_f': 4.374e-05, 't_wall_nlp_g': 0.00533437, 't_wall_nlp_grad': 0.0, 't_wall_nlp_grad_f': 8.6721e-05, 't_wall_nlp_hess_l': 1.4343645870000001, 't_wall_nlp_jac_g': 0.136655046, 't_wall_total': 1.580050751, 'unified_return_status': 'SOLVER_RET_LIMITED'}\n",
      "Solver fails under iter 2 return last iteration results!\n",
      "Setting the init for x\n",
      "Settiing the init for u\n",
      "      solver  :   t_proc      (avg)   t_wall      (avg)    n_eval\n",
      "       nlp_f  |  47.00us ( 15.67us)  45.21us ( 15.07us)         3\n",
      "       nlp_g  |   5.28ms (  1.76ms)   5.28ms (  1.76ms)         3\n",
      "  nlp_grad_f  |  93.00us ( 23.25us)  91.95us ( 22.99us)         4\n",
      "  nlp_hess_l  |   1.44 s (720.54ms)   1.44 s (720.51ms)         2\n",
      "   nlp_jac_g  | 137.59ms ( 34.40ms) 137.63ms ( 34.41ms)         4\n",
      "       total  |   1.59 s (  1.59 s)   1.59 s (  1.59 s)         1\n",
      "{'iter_count': 2, 'iterations': {'alpha_du': [0.0, 0.9870126773485647, 0.9126675018668906], 'alpha_pr': [0.0, 1.0, 1.0], 'd_norm': [0.0, 0.14597286090969916, 0.11073013181839866], 'inf_du': [0.04073501972923481, 0.013777453680719587, 0.04240550723384684], 'inf_pr': [0.00020999062646209765, 0.000504818336619639, 0.00014865765777871687], 'mu': [0.1, 0.1, 0.020000000000000004], 'obj': [88.99310491404016, 89.03810931306063, 89.00387834088696], 'regularization_size': [0.0, 0.0, 0.0]}, 'n_call_callback_fun': 0, 'n_call_nlp_f': 3, 'n_call_nlp_g': 3, 'n_call_nlp_grad': 0, 'n_call_nlp_grad_f': 4, 'n_call_nlp_hess_l': 2, 'n_call_nlp_jac_g': 4, 'n_call_total': 1, 'return_status': 'Maximum_Iterations_Exceeded', 'success': False, 't_proc_callback_fun': 0.0, 't_proc_nlp_f': 4.7e-05, 't_proc_nlp_g': 0.005276, 't_proc_nlp_grad': 0.0, 't_proc_nlp_grad_f': 9.3e-05, 't_proc_nlp_hess_l': 1.441089, 't_proc_nlp_jac_g': 0.137594, 't_proc_total': 1.587845, 't_wall_callback_fun': 0.0, 't_wall_nlp_f': 4.5214000000000005e-05, 't_wall_nlp_g': 0.005279484, 't_wall_nlp_grad': 0.0, 't_wall_nlp_grad_f': 9.1954e-05, 't_wall_nlp_hess_l': 1.441020343, 't_wall_nlp_jac_g': 0.137633534, 't_wall_total': 1.587759886, 'unified_return_status': 'SOLVER_RET_LIMITED'}\n",
      "Solver fails under iter 2 return last iteration results!\n",
      "Setting the init for x\n",
      "Settiing the init for u\n",
      "      solver  :   t_proc      (avg)   t_wall      (avg)    n_eval\n",
      "       nlp_f  |  46.00us ( 15.33us)  44.27us ( 14.76us)         3\n",
      "       nlp_g  |   5.26ms (  1.75ms)   5.26ms (  1.75ms)         3\n",
      "  nlp_grad_f  |  92.00us ( 23.00us)  91.99us ( 23.00us)         4\n",
      "  nlp_hess_l  |   1.45 s (725.39ms)   1.45 s (725.36ms)         2\n",
      "   nlp_jac_g  | 138.22ms ( 34.55ms) 138.25ms ( 34.56ms)         4\n",
      "       total  |   1.60 s (  1.60 s)   1.60 s (  1.60 s)         1\n",
      "{'iter_count': 2, 'iterations': {'alpha_du': [0.0, 0.990436372498705, 0.7978143185752401], 'alpha_pr': [0.0, 1.0, 1.0], 'd_norm': [0.0, 0.12597807388712606, 0.16624503605222646], 'inf_du': [0.037384011429015596, 0.011493123944484207, 0.10315345645212809], 'inf_pr': [0.00014865765777871687, 0.00041347555016457704, 0.0004821301254596122], 'mu': [0.1, 0.1, 0.002828427124746191], 'obj': [88.58446107343946, 88.62143799790846, 88.55742158309236], 'regularization_size': [0.0, 0.0, 0.0]}, 'n_call_callback_fun': 0, 'n_call_nlp_f': 3, 'n_call_nlp_g': 3, 'n_call_nlp_grad': 0, 'n_call_nlp_grad_f': 4, 'n_call_nlp_hess_l': 2, 'n_call_nlp_jac_g': 4, 'n_call_total': 1, 'return_status': 'Maximum_Iterations_Exceeded', 'success': False, 't_proc_callback_fun': 0.0, 't_proc_nlp_f': 4.6e-05, 't_proc_nlp_g': 0.0052580000000000005, 't_proc_nlp_grad': 0.0, 't_proc_nlp_grad_f': 9.199999999999999e-05, 't_proc_nlp_hess_l': 1.450777, 't_proc_nlp_jac_g': 0.138217, 't_proc_total': 1.598143, 't_wall_callback_fun': 0.0, 't_wall_nlp_f': 4.4268000000000004e-05, 't_wall_nlp_g': 0.005261511, 't_wall_nlp_grad': 0.0, 't_wall_nlp_grad_f': 9.1986e-05, 't_wall_nlp_hess_l': 1.45072774, 't_wall_nlp_jac_g': 0.13825061900000002, 't_wall_total': 1.598075339, 'unified_return_status': 'SOLVER_RET_LIMITED'}\n",
      "Solver fails under iter 2 return last iteration results!\n",
      "Setting the init for x\n",
      "Settiing the init for u\n",
      "      solver  :   t_proc      (avg)   t_wall      (avg)    n_eval\n",
      "       nlp_f  |  45.00us ( 15.00us)  42.72us ( 14.24us)         3\n",
      "       nlp_g  |   5.22ms (  1.74ms)   5.22ms (  1.74ms)         3\n",
      "  nlp_grad_f  |  90.00us ( 22.50us)  89.56us ( 22.39us)         4\n",
      "  nlp_hess_l  |   1.45 s (727.31ms)   1.45 s (727.27ms)         2\n",
      "   nlp_jac_g  | 138.00ms ( 34.50ms) 138.02ms ( 34.51ms)         4\n",
      "       total  |   1.60 s (  1.60 s)   1.60 s (  1.60 s)         1\n",
      "{'iter_count': 2, 'iterations': {'alpha_du': [0.0, 0.987655508837884, 0.9660966692771484], 'alpha_pr': [0.0, 1.0, 1.0], 'd_norm': [0.0, 0.1396523780937626, 0.08108627811657058], 'inf_du': [0.0337806229714297, 0.01283479635912843, 0.02073799788215336], 'inf_pr': [0.0004821301254596122, 0.0004717700672323133, 5.9401719068041814e-05], 'mu': [0.1, 0.1, 0.020000000000000004], 'obj': [88.16007761429302, 88.19011255012047, 88.16614963986444], 'regularization_size': [0.0, 0.0, 0.0]}, 'n_call_callback_fun': 0, 'n_call_nlp_f': 3, 'n_call_nlp_g': 3, 'n_call_nlp_grad': 0, 'n_call_nlp_grad_f': 4, 'n_call_nlp_hess_l': 2, 'n_call_nlp_jac_g': 4, 'n_call_total': 1, 'return_status': 'Maximum_Iterations_Exceeded', 'success': False, 't_proc_callback_fun': 0.0, 't_proc_nlp_f': 4.4999999999999996e-05, 't_proc_nlp_g': 0.005222, 't_proc_nlp_grad': 0.0, 't_proc_nlp_grad_f': 8.999999999999999e-05, 't_proc_nlp_hess_l': 1.454619, 't_proc_nlp_jac_g': 0.137995, 't_proc_total': 1.601733, 't_wall_callback_fun': 0.0, 't_wall_nlp_f': 4.2724e-05, 't_wall_nlp_g': 0.00522306, 't_wall_nlp_grad': 0.0, 't_wall_nlp_grad_f': 8.9555e-05, 't_wall_nlp_hess_l': 1.454530423, 't_wall_nlp_jac_g': 0.13802489099999998, 't_wall_total': 1.601615512, 'unified_return_status': 'SOLVER_RET_LIMITED'}\n",
      "Solver fails under iter 2 return last iteration results!\n",
      "Setting the init for x\n",
      "Settiing the init for u\n",
      "      solver  :   t_proc      (avg)   t_wall      (avg)    n_eval\n",
      "       nlp_f  |  48.00us ( 16.00us)  43.86us ( 14.62us)         3\n",
      "       nlp_g  |   5.23ms (  1.74ms)   5.23ms (  1.74ms)         3\n",
      "  nlp_grad_f  |  89.00us ( 22.25us)  90.17us ( 22.54us)         4\n",
      "  nlp_hess_l  |   1.44 s (721.36ms)   1.44 s (721.36ms)         2\n",
      "   nlp_jac_g  | 136.21ms ( 34.05ms) 136.24ms ( 34.06ms)         4\n",
      "       total  |   1.59 s (  1.59 s)   1.59 s (  1.59 s)         1\n",
      "{'iter_count': 2, 'iterations': {'alpha_du': [0.0, 0.9924201383993682, 0.8552933325668731], 'alpha_pr': [0.0, 1.0, 1.0], 'd_norm': [0.0, 0.11843218933167748, 0.16044151374619853], 'inf_du': [0.0286652860008434, 0.011193369733017766, 0.05419740541119544], 'inf_pr': [5.9401719068041814e-05, 0.0003448490893052103, 0.000519289843186499], 'mu': [0.1, 0.1, 0.002828427124746191], 'obj': [87.76725596011055, 87.79607284917026, 87.74907391161214], 'regularization_size': [0.0, 0.0, 0.0]}, 'n_call_callback_fun': 0, 'n_call_nlp_f': 3, 'n_call_nlp_g': 3, 'n_call_nlp_grad': 0, 'n_call_nlp_grad_f': 4, 'n_call_nlp_hess_l': 2, 'n_call_nlp_jac_g': 4, 'n_call_total': 1, 'return_status': 'Maximum_Iterations_Exceeded', 'success': False, 't_proc_callback_fun': 0.0, 't_proc_nlp_f': 4.8e-05, 't_proc_nlp_g': 0.0052320000000000005, 't_proc_nlp_grad': 0.0, 't_proc_nlp_grad_f': 8.9e-05, 't_proc_nlp_hess_l': 1.4427240000000001, 't_proc_nlp_jac_g': 0.136212, 't_proc_total': 1.588029, 't_wall_callback_fun': 0.0, 't_wall_nlp_f': 4.3862e-05, 't_wall_nlp_g': 0.005233641, 't_wall_nlp_grad': 0.0, 't_wall_nlp_grad_f': 9.0165e-05, 't_wall_nlp_hess_l': 1.4427141780000001, 't_wall_nlp_jac_g': 0.13623754100000002, 't_wall_total': 1.587991256, 'unified_return_status': 'SOLVER_RET_LIMITED'}\n",
      "Solver fails under iter 2 return last iteration results!\n",
      "Setting the init for x\n",
      "Settiing the init for u\n",
      "      solver  :   t_proc      (avg)   t_wall      (avg)    n_eval\n",
      "       nlp_f  |  48.00us ( 16.00us)  44.21us ( 14.74us)         3\n",
      "       nlp_g  |   5.27ms (  1.76ms)   5.27ms (  1.76ms)         3\n",
      "  nlp_grad_f  |  91.00us ( 22.75us)  92.33us ( 23.08us)         4\n",
      "  nlp_hess_l  |   1.44 s (717.98ms)   1.44 s (718.09ms)         2\n",
      "   nlp_jac_g  | 137.92ms ( 34.48ms) 138.06ms ( 34.52ms)         4\n",
      "       total  |   1.58 s (  1.58 s)   1.58 s (  1.58 s)         1\n",
      "{'iter_count': 2, 'iterations': {'alpha_du': [0.0, 0.9910240858830955, 0.8800300775453486], 'alpha_pr': [0.0, 1.0, 1.0], 'd_norm': [0.0, 0.12745807744738558, 0.12599354193527126], 'inf_du': [0.024231823990701118, 0.012502692817281114, 0.0387097963410718], 'inf_pr': [0.000519289843186499, 0.0003752492972330934, 0.00031189125420549857], 'mu': [0.1, 0.1, 0.002828427124746191], 'obj': [87.35404484266975, 87.37560175020388, 87.34291238890688], 'regularization_size': [0.0, 0.0, 0.0]}, 'n_call_callback_fun': 0, 'n_call_nlp_f': 3, 'n_call_nlp_g': 3, 'n_call_nlp_grad': 0, 'n_call_nlp_grad_f': 4, 'n_call_nlp_hess_l': 2, 'n_call_nlp_jac_g': 4, 'n_call_total': 1, 'return_status': 'Maximum_Iterations_Exceeded', 'success': False, 't_proc_callback_fun': 0.0, 't_proc_nlp_f': 4.8e-05, 't_proc_nlp_g': 0.005267, 't_proc_nlp_grad': 0.0, 't_proc_nlp_grad_f': 9.099999999999999e-05, 't_proc_nlp_hess_l': 1.435953, 't_proc_nlp_jac_g': 0.137919, 't_proc_total': 1.583004, 't_wall_callback_fun': 0.0, 't_wall_nlp_f': 4.4207e-05, 't_wall_nlp_g': 0.005268295, 't_wall_nlp_grad': 0.0, 't_wall_nlp_grad_f': 9.233e-05, 't_wall_nlp_hess_l': 1.436183519, 't_wall_nlp_jac_g': 0.138063126, 't_wall_total': 1.583322426, 'unified_return_status': 'SOLVER_RET_LIMITED'}\n",
      "Solver fails under iter 2 return last iteration results!\n",
      "Setting the init for x\n",
      "Settiing the init for u\n",
      "      solver  :   t_proc      (avg)   t_wall      (avg)    n_eval\n",
      "       nlp_f  | 251.00us ( 83.67us) 241.81us ( 80.60us)         3\n",
      "       nlp_g  |   5.18ms (  1.73ms)   5.18ms (  1.73ms)         3\n",
      "  nlp_grad_f  |  94.00us ( 23.50us)  95.51us ( 23.88us)         4\n",
      "  nlp_hess_l  |   1.51 s (753.12ms)   1.51 s (753.68ms)         2\n",
      "   nlp_jac_g  | 140.13ms ( 35.03ms) 140.20ms ( 35.05ms)         4\n",
      "       total  |   1.66 s (  1.66 s)   1.66 s (  1.66 s)         1\n",
      "{'iter_count': 2, 'iterations': {'alpha_du': [0.0, 0.9915531678224959, 0.9178301100675706], 'alpha_pr': [0.0, 1.0, 1.0], 'd_norm': [0.0, 0.12738468665874456, 0.11135625420862322], 'inf_du': [0.019334378653199716, 0.01274087346395314, 0.0224377336276797], 'inf_pr': [0.00031189125420549857, 0.0003459364941078569, 0.00024004029204416355], 'mu': [0.1, 0.1, 0.002828427124746191], 'obj': [86.94680982614338, 86.96569095186886, 86.94108402516864], 'regularization_size': [0.0, 0.0, 0.0]}, 'n_call_callback_fun': 0, 'n_call_nlp_f': 3, 'n_call_nlp_g': 3, 'n_call_nlp_grad': 0, 'n_call_nlp_grad_f': 4, 'n_call_nlp_hess_l': 2, 'n_call_nlp_jac_g': 4, 'n_call_total': 1, 'return_status': 'Maximum_Iterations_Exceeded', 'success': False, 't_proc_callback_fun': 0.0, 't_proc_nlp_f': 0.000251, 't_proc_nlp_g': 0.005176999999999999, 't_proc_nlp_grad': 0.0, 't_proc_nlp_grad_f': 9.4e-05, 't_proc_nlp_hess_l': 1.506235, 't_proc_nlp_jac_g': 0.140128, 't_proc_total': 1.655938, 't_wall_callback_fun': 0.0, 't_wall_nlp_f': 0.000241812, 't_wall_nlp_g': 0.005178065, 't_wall_nlp_grad': 0.0, 't_wall_nlp_grad_f': 9.5514e-05, 't_wall_nlp_hess_l': 1.507358758, 't_wall_nlp_jac_g': 0.14020463300000002, 't_wall_total': 1.657081231, 'unified_return_status': 'SOLVER_RET_LIMITED'}\n",
      "Solver fails under iter 2 return last iteration results!\n",
      "Setting the init for x\n",
      "Settiing the init for u\n",
      "      solver  :   t_proc      (avg)   t_wall      (avg)    n_eval\n",
      "       nlp_f  |  47.00us ( 15.67us)  45.64us ( 15.21us)         3\n",
      "       nlp_g  |   5.52ms (  1.84ms)   5.53ms (  1.84ms)         3\n",
      "  nlp_grad_f  |  92.00us ( 23.00us)  92.72us ( 23.18us)         4\n",
      "  nlp_hess_l  |   1.55 s (774.98ms)   1.55 s (775.18ms)         2\n",
      "   nlp_jac_g  | 144.27ms ( 36.07ms) 144.33ms ( 36.08ms)         4\n",
      "       total  |   1.70 s (  1.70 s)   1.70 s (  1.70 s)         1\n",
      "{'iter_count': 2, 'iterations': {'alpha_du': [0.0, 0.9933055531988952, 0.9630579931138032], 'alpha_pr': [0.0, 1.0, 1.0], 'd_norm': [0.0, 0.1223777353155658, 0.1005998235803156], 'inf_du': [0.014439003710020375, 0.012392533089306434, 0.008392909621617706], 'inf_pr': [0.00024004029204416355, 0.0002931014527551845, 0.00020049380812059425], 'mu': [0.1, 0.1, 0.002828427124746191], 'obj': [86.54570898764925, 86.56111906167386, 86.54254444979357], 'regularization_size': [0.0, 0.0, 0.0]}, 'n_call_callback_fun': 0, 'n_call_nlp_f': 3, 'n_call_nlp_g': 3, 'n_call_nlp_grad': 0, 'n_call_nlp_grad_f': 4, 'n_call_nlp_hess_l': 2, 'n_call_nlp_jac_g': 4, 'n_call_total': 1, 'return_status': 'Maximum_Iterations_Exceeded', 'success': False, 't_proc_callback_fun': 0.0, 't_proc_nlp_f': 4.7000000000000004e-05, 't_proc_nlp_g': 0.005518, 't_proc_nlp_grad': 0.0, 't_proc_nlp_grad_f': 9.2e-05, 't_proc_nlp_hess_l': 1.549953, 't_proc_nlp_jac_g': 0.144268, 't_proc_total': 1.70381, 't_wall_callback_fun': 0.0, 't_wall_nlp_f': 4.5637000000000004e-05, 't_wall_nlp_g': 0.00552969, 't_wall_nlp_grad': 0.0, 't_wall_nlp_grad_f': 9.272299999999999e-05, 't_wall_nlp_hess_l': 1.550368705, 't_wall_nlp_jac_g': 0.144327189, 't_wall_total': 1.704236698, 'unified_return_status': 'SOLVER_RET_LIMITED'}\n",
      "Solver fails under iter 2 return last iteration results!\n",
      "Setting the init for x\n",
      "Settiing the init for u\n",
      "      solver  :   t_proc      (avg)   t_wall      (avg)    n_eval\n",
      "       nlp_f  |  52.00us ( 17.33us)  49.79us ( 16.60us)         3\n",
      "       nlp_g  |   5.64ms (  1.88ms)   5.64ms (  1.88ms)         3\n",
      "  nlp_grad_f  | 102.00us ( 25.50us) 101.99us ( 25.50us)         4\n",
      "  nlp_hess_l  |   1.67 s (835.53ms)   1.67 s (836.75ms)         2\n",
      "   nlp_jac_g  | 148.18ms ( 37.05ms) 148.40ms ( 37.10ms)         4\n",
      "       total  |   1.83 s (  1.83 s)   1.83 s (  1.83 s)         1\n",
      "{'iter_count': 2, 'iterations': {'alpha_du': [0.0, 0.9957842095081177, 0.9826812048109357], 'alpha_pr': [0.0, 1.0, 1.0], 'd_norm': [0.0, 0.11453930421674231, 0.09022034028282587], 'inf_du': [0.009814834889481767, 0.011834066804213617, 0.006246097417912155], 'inf_pr': [0.00020049380812059425, 0.00023662947720337613, 0.0001696875945675913], 'mu': [0.1, 0.1, 0.002828427124746191], 'obj': [86.15235670878353, 86.1640948872146, 86.15029747008542], 'regularization_size': [0.0, 0.0, 0.0]}, 'n_call_callback_fun': 0, 'n_call_nlp_f': 3, 'n_call_nlp_g': 3, 'n_call_nlp_grad': 0, 'n_call_nlp_grad_f': 4, 'n_call_nlp_hess_l': 2, 'n_call_nlp_jac_g': 4, 'n_call_total': 1, 'return_status': 'Maximum_Iterations_Exceeded', 'success': False, 't_proc_callback_fun': 0.0, 't_proc_nlp_f': 5.2000000000000004e-05, 't_proc_nlp_g': 0.005638000000000001, 't_proc_nlp_grad': 0.0, 't_proc_nlp_grad_f': 0.00010200000000000001, 't_proc_nlp_hess_l': 1.6710530000000001, 't_proc_nlp_jac_g': 0.14818399999999998, 't_proc_total': 1.829356, 't_wall_callback_fun': 0.0, 't_wall_nlp_f': 4.9788000000000005e-05, 't_wall_nlp_g': 0.005639865000000001, 't_wall_nlp_grad': 0.0, 't_wall_nlp_grad_f': 0.000101993, 't_wall_nlp_hess_l': 1.673501114, 't_wall_nlp_jac_g': 0.14840004299999998, 't_wall_total': 1.831950936, 'unified_return_status': 'SOLVER_RET_LIMITED'}\n",
      "Solver fails under iter 2 return last iteration results!\n",
      "Setting the init for x\n",
      "Settiing the init for u\n",
      "      solver  :   t_proc      (avg)   t_wall      (avg)    n_eval\n",
      "       nlp_f  |  61.00us ( 20.33us)  54.76us ( 18.25us)         3\n",
      "       nlp_g  |   5.73ms (  1.91ms)   5.74ms (  1.91ms)         3\n",
      "  nlp_grad_f  | 104.00us ( 26.00us) 104.20us ( 26.05us)         4\n",
      "  nlp_hess_l  |   1.61 s (805.70ms)   1.61 s (805.71ms)         2\n",
      "   nlp_jac_g  | 147.78ms ( 36.95ms) 147.85ms ( 36.96ms)         4\n",
      "       total  |   1.77 s (  1.77 s)   1.77 s (  1.77 s)         1\n",
      "{'iter_count': 2, 'iterations': {'alpha_du': [0.0, 0.998695195955625, 0.9856787246731034], 'alpha_pr': [0.0, 1.0, 1.0], 'd_norm': [0.0, 0.10482545421179504, 0.08045310210042925], 'inf_du': [0.006730161465621058, 0.010499522247449322, 0.005154924290788454], 'inf_pr': [0.0001696875945675913, 0.00018525115977174877, 0.00013932069006772352], 'mu': [0.1, 0.1, 0.002828427124746191], 'obj': [85.77098487797348, 85.77913263767844, 85.76909203258575], 'regularization_size': [0.0, 0.0, 0.0]}, 'n_call_callback_fun': 0, 'n_call_nlp_f': 3, 'n_call_nlp_g': 3, 'n_call_nlp_grad': 0, 'n_call_nlp_grad_f': 4, 'n_call_nlp_hess_l': 2, 'n_call_nlp_jac_g': 4, 'n_call_total': 1, 'return_status': 'Maximum_Iterations_Exceeded', 'success': False, 't_proc_callback_fun': 0.0, 't_proc_nlp_f': 6.1e-05, 't_proc_nlp_g': 0.00573, 't_proc_nlp_grad': 0.0, 't_proc_nlp_grad_f': 0.00010400000000000001, 't_proc_nlp_hess_l': 1.611395, 't_proc_nlp_jac_g': 0.147785, 't_proc_total': 1.769289, 't_wall_callback_fun': 0.0, 't_wall_nlp_f': 5.4763000000000004e-05, 't_wall_nlp_g': 0.00573753, 't_wall_nlp_grad': 0.0, 't_wall_nlp_grad_f': 0.000104205, 't_wall_nlp_hess_l': 1.6114266449999999, 't_wall_nlp_jac_g': 0.147850307, 't_wall_total': 1.769312763, 'unified_return_status': 'SOLVER_RET_LIMITED'}\n",
      "Solver fails under iter 2 return last iteration results!\n",
      "Setting the init for x\n",
      "Settiing the init for u\n",
      "      solver  :   t_proc      (avg)   t_wall      (avg)    n_eval\n",
      "       nlp_f  |  51.00us ( 17.00us)  47.17us ( 15.72us)         3\n",
      "       nlp_g  |   5.54ms (  1.84ms)   5.54ms (  1.85ms)         3\n",
      "  nlp_grad_f  |  98.00us ( 24.50us)  98.27us ( 24.57us)         4\n",
      "  nlp_hess_l  |   1.52 s (760.15ms)   1.52 s (760.16ms)         2\n",
      "   nlp_jac_g  | 146.98ms ( 36.74ms) 147.02ms ( 36.75ms)         4\n",
      "       total  |   1.68 s (  1.68 s)   1.68 s (  1.68 s)         1\n",
      "{'iter_count': 2, 'iterations': {'alpha_du': [0.0, 1.0, 0.9882604104224304], 'alpha_pr': [0.0, 1.0, 1.0], 'd_norm': [0.0, 0.09480795113569043, 0.0734325637875842], 'inf_du': [0.006796061718577144, 0.00868181242385857, 0.0041435489824042104], 'inf_pr': [0.00013932069006772352, 0.00013679749217976322, 0.00010350590716567964], 'mu': [0.1, 0.1, 0.002828427124746191], 'obj': [85.40680484639466, 85.41160756193975, 85.40452073802395], 'regularization_size': [0.0, 0.0, 0.0]}, 'n_call_callback_fun': 0, 'n_call_nlp_f': 3, 'n_call_nlp_g': 3, 'n_call_nlp_grad': 0, 'n_call_nlp_grad_f': 4, 'n_call_nlp_hess_l': 2, 'n_call_nlp_jac_g': 4, 'n_call_total': 1, 'return_status': 'Maximum_Iterations_Exceeded', 'success': False, 't_proc_callback_fun': 0.0, 't_proc_nlp_f': 5.1e-05, 't_proc_nlp_g': 0.005535, 't_proc_nlp_grad': 0.0, 't_proc_nlp_grad_f': 9.800000000000001e-05, 't_proc_nlp_hess_l': 1.520295, 't_proc_nlp_jac_g': 0.14698, 't_proc_total': 1.676918, 't_wall_callback_fun': 0.0, 't_wall_nlp_f': 4.7172e-05, 't_wall_nlp_g': 0.005540208, 't_wall_nlp_grad': 0.0, 't_wall_nlp_grad_f': 9.8267e-05, 't_wall_nlp_hess_l': 1.520316636, 't_wall_nlp_jac_g': 0.147018236, 't_wall_total': 1.676915848, 'unified_return_status': 'SOLVER_RET_LIMITED'}\n",
      "Solver fails under iter 2 return last iteration results!\n",
      "Setting the init for x\n",
      "Settiing the init for u\n",
      "      solver  :   t_proc      (avg)   t_wall      (avg)    n_eval\n",
      "       nlp_f  |  50.00us ( 16.67us)  46.09us ( 15.36us)         3\n",
      "       nlp_g  |   5.76ms (  1.92ms)   5.76ms (  1.92ms)         3\n",
      "  nlp_grad_f  |  99.00us ( 24.75us)  99.08us ( 24.77us)         4\n",
      "  nlp_hess_l  |   1.62 s (810.27ms)   1.62 s (810.94ms)         2\n",
      "   nlp_jac_g  | 146.16ms ( 36.54ms) 146.30ms ( 36.58ms)         4\n",
      "       total  |   1.78 s (  1.78 s)   1.78 s (  1.78 s)         1\n",
      "{'iter_count': 2, 'iterations': {'alpha_du': [0.0, 1.0, 0.9916397849328864], 'alpha_pr': [0.0, 1.0, 1.0], 'd_norm': [0.0, 0.08426480343698922, 0.06522131886295567], 'inf_du': [0.0068976643736978135, 0.006657428512192531, 0.0031618660369694407], 'inf_pr': [0.00010350590716567964, 9.420488171807406e-05, 7.056456115694942e-05], 'mu': [0.1, 0.1, 0.002828427124746191], 'obj': [85.06544372538818, 85.06730789005631, 85.062460787478], 'regularization_size': [0.0, 0.0, 0.0]}, 'n_call_callback_fun': 0, 'n_call_nlp_f': 3, 'n_call_nlp_g': 3, 'n_call_nlp_grad': 0, 'n_call_nlp_grad_f': 4, 'n_call_nlp_hess_l': 2, 'n_call_nlp_jac_g': 4, 'n_call_total': 1, 'return_status': 'Maximum_Iterations_Exceeded', 'success': False, 't_proc_callback_fun': 0.0, 't_proc_nlp_f': 4.9999999999999996e-05, 't_proc_nlp_g': 0.0057610000000000005, 't_proc_nlp_grad': 0.0, 't_proc_nlp_grad_f': 9.9e-05, 't_proc_nlp_hess_l': 1.6205479999999999, 't_proc_nlp_jac_g': 0.146157, 't_proc_total': 1.77655, 't_wall_callback_fun': 0.0, 't_wall_nlp_f': 4.6091e-05, 't_wall_nlp_g': 0.005762912, 't_wall_nlp_grad': 0.0, 't_wall_nlp_grad_f': 9.9076e-05, 't_wall_nlp_hess_l': 1.6218840239999999, 't_wall_nlp_jac_g': 0.14630293099999997, 't_wall_total': 1.777980509, 'unified_return_status': 'SOLVER_RET_LIMITED'}\n",
      "Solver fails under iter 2 return last iteration results!\n",
      "Setting the init for x\n",
      "Settiing the init for u\n",
      "      solver  :   t_proc      (avg)   t_wall      (avg)    n_eval\n",
      "       nlp_f  |  66.00us ( 22.00us)  56.78us ( 18.93us)         3\n",
      "       nlp_g  |   6.03ms (  2.01ms)   6.03ms (  2.01ms)         3\n",
      "  nlp_grad_f  | 119.00us ( 29.75us) 120.27us ( 30.07us)         4\n",
      "  nlp_hess_l  |   1.61 s (803.28ms)   1.61 s (803.31ms)         2\n",
      "   nlp_jac_g  | 156.24ms ( 39.06ms) 156.35ms ( 39.09ms)         4\n",
      "       total  |   1.77 s (  1.77 s)   1.77 s (  1.77 s)         1\n",
      "{'iter_count': 2, 'iterations': {'alpha_du': [0.0, 1.0, 0.9957634652208658], 'alpha_pr': [0.0, 1.0, 1.0], 'd_norm': [0.0, 0.0722427200822064, 0.05917893400543851], 'inf_du': [0.0070062616716720615, 0.004654241660484892, 0.0022090824725271574], 'inf_pr': [7.056456115694942e-05, 6.199389989580695e-05, 4.2193900300802056e-05], 'mu': [0.1, 0.1, 0.002828427124746191], 'obj': [84.75264723253203, 84.75206119739948, 84.74883274505206], 'regularization_size': [0.0, 0.0, 0.0]}, 'n_call_callback_fun': 0, 'n_call_nlp_f': 3, 'n_call_nlp_g': 3, 'n_call_nlp_grad': 0, 'n_call_nlp_grad_f': 4, 'n_call_nlp_hess_l': 2, 'n_call_nlp_jac_g': 4, 'n_call_total': 1, 'return_status': 'Maximum_Iterations_Exceeded', 'success': False, 't_proc_callback_fun': 0.0, 't_proc_nlp_f': 6.6e-05, 't_proc_nlp_g': 0.006026999999999999, 't_proc_nlp_grad': 0.0, 't_proc_nlp_grad_f': 0.00011899999999999999, 't_proc_nlp_hess_l': 1.606556, 't_proc_nlp_jac_g': 0.15624, 't_proc_total': 1.773341, 't_wall_callback_fun': 0.0, 't_wall_nlp_f': 5.6784e-05, 't_wall_nlp_g': 0.006029318, 't_wall_nlp_grad': 0.0, 't_wall_nlp_grad_f': 0.00012026699999999999, 't_wall_nlp_hess_l': 1.6066221299999999, 't_wall_nlp_jac_g': 0.156348078, 't_wall_total': 1.773445308, 'unified_return_status': 'SOLVER_RET_LIMITED'}\n",
      "Solver fails under iter 2 return last iteration results!\n",
      "Setting the init for x\n",
      "Settiing the init for u\n",
      "      solver  :   t_proc      (avg)   t_wall      (avg)    n_eval\n",
      "       nlp_f  |  57.00us ( 19.00us)  49.72us ( 16.57us)         3\n",
      "       nlp_g  |   6.22ms (  2.07ms)   6.24ms (  2.08ms)         3\n",
      "  nlp_grad_f  | 134.00us ( 33.50us) 133.97us ( 33.49us)         4\n",
      "  nlp_hess_l  |   1.65 s (827.28ms)   1.66 s (828.01ms)         2\n",
      "   nlp_jac_g  | 158.38ms ( 39.60ms) 158.55ms ( 39.64ms)         4\n",
      "       total  |   1.82 s (  1.82 s)   1.83 s (  1.83 s)         1\n",
      "{'iter_count': 2, 'iterations': {'alpha_du': [0.0, 1.0, 1.0], 'alpha_pr': [0.0, 1.0, 1.0], 'd_norm': [0.0, 0.07243012443607637, 0.052406091134334594], 'inf_du': [0.0070899340582083826, 0.0028573780505805058, 0.001458246429178578], 'inf_pr': [4.2193900300802056e-05, 3.749591203616731e-05, 1.779450562144902e-05], 'mu': [0.1, 0.1, 0.002828427124746191], 'obj': [84.47414725725724, 84.47169271431608, 84.4695301529732], 'regularization_size': [0.0, 0.0, 0.0]}, 'n_call_callback_fun': 0, 'n_call_nlp_f': 3, 'n_call_nlp_g': 3, 'n_call_nlp_grad': 0, 'n_call_nlp_grad_f': 4, 'n_call_nlp_hess_l': 2, 'n_call_nlp_jac_g': 4, 'n_call_total': 1, 'return_status': 'Maximum_Iterations_Exceeded', 'success': False, 't_proc_callback_fun': 0.0, 't_proc_nlp_f': 5.7e-05, 't_proc_nlp_g': 0.006216, 't_proc_nlp_grad': 0.0, 't_proc_nlp_grad_f': 0.000134, 't_proc_nlp_hess_l': 1.654559, 't_proc_nlp_jac_g': 0.158384, 't_proc_total': 1.823627, 't_wall_callback_fun': 0.0, 't_wall_nlp_f': 4.9724e-05, 't_wall_nlp_g': 0.006235604, 't_wall_nlp_grad': 0.0, 't_wall_nlp_grad_f': 0.000133974, 't_wall_nlp_hess_l': 1.656028341, 't_wall_nlp_jac_g': 0.158554836, 't_wall_total': 1.825201947, 'unified_return_status': 'SOLVER_RET_LIMITED'}\n",
      "Solver fails under iter 2 return last iteration results!\n",
      "Setting the init for x\n",
      "Settiing the init for u\n",
      "      solver  :   t_proc      (avg)   t_wall      (avg)    n_eval\n",
      "       nlp_f  |  52.00us ( 17.33us)  47.12us ( 15.71us)         3\n",
      "       nlp_g  |   5.67ms (  1.89ms)   5.67ms (  1.89ms)         3\n",
      "  nlp_grad_f  | 102.00us ( 25.50us) 102.32us ( 25.58us)         4\n",
      "  nlp_hess_l  |   1.60 s (798.32ms)   1.60 s (798.36ms)         2\n",
      "   nlp_jac_g  | 145.66ms ( 36.42ms) 145.71ms ( 36.43ms)         4\n",
      "       total  |   1.75 s (  1.75 s)   1.75 s (  1.75 s)         1\n",
      "{'iter_count': 2, 'iterations': {'alpha_du': [0.0, 1.0, 1.0], 'alpha_pr': [0.0, 1.0, 1.0], 'd_norm': [0.0, 0.06987398337648267, 0.051340892710560776], 'inf_du': [0.0071223462146995705, 0.0014214175455395939, 0.0006107628857376923], 'inf_pr': [1.779450562144902e-05, 1.9628368512769612e-05, 2.894223774807525e-05], 'mu': [0.1, 0.1, 0.002828427124746191], 'obj': [84.23600306218397, 84.23237552489715, 84.23066136508001], 'regularization_size': [0.0, 0.0, 0.0]}, 'n_call_callback_fun': 0, 'n_call_nlp_f': 3, 'n_call_nlp_g': 3, 'n_call_nlp_grad': 0, 'n_call_nlp_grad_f': 4, 'n_call_nlp_hess_l': 2, 'n_call_nlp_jac_g': 4, 'n_call_total': 1, 'return_status': 'Maximum_Iterations_Exceeded', 'success': False, 't_proc_callback_fun': 0.0, 't_proc_nlp_f': 5.2000000000000004e-05, 't_proc_nlp_g': 0.005669, 't_proc_nlp_grad': 0.0, 't_proc_nlp_grad_f': 0.00010200000000000001, 't_proc_nlp_hess_l': 1.596644, 't_proc_nlp_jac_g': 0.145665, 't_proc_total': 1.752238, 't_wall_callback_fun': 0.0, 't_wall_nlp_f': 4.712e-05, 't_wall_nlp_g': 0.005671443, 't_wall_nlp_grad': 0.0, 't_wall_nlp_grad_f': 0.000102323, 't_wall_nlp_hess_l': 1.5967162560000001, 't_wall_nlp_jac_g': 0.145707545, 't_wall_total': 1.752289157, 'unified_return_status': 'SOLVER_RET_LIMITED'}\n",
      "Solver fails under iter 2 return last iteration results!\n",
      "Setting the init for x\n",
      "Settiing the init for u\n",
      "      solver  :   t_proc      (avg)   t_wall      (avg)    n_eval\n",
      "       nlp_f  |  53.00us ( 17.67us)  47.09us ( 15.70us)         3\n",
      "       nlp_g  |   5.69ms (  1.90ms)   5.71ms (  1.90ms)         3\n",
      "  nlp_grad_f  | 100.00us ( 25.00us) 100.64us ( 25.16us)         4\n",
      "  nlp_hess_l  |   1.56 s (780.20ms)   1.56 s (780.33ms)         2\n",
      "   nlp_jac_g  | 148.26ms ( 37.06ms) 148.31ms ( 37.08ms)         4\n",
      "       total  |   1.72 s (  1.72 s)   1.72 s (  1.72 s)         1\n",
      "{'iter_count': 2, 'iterations': {'alpha_du': [0.0, 1.0, 1.0], 'alpha_pr': [0.0, 1.0, 1.0], 'd_norm': [0.0, 0.060715007354566884, 0.06243485200339443], 'inf_du': [0.007084097102291965, 0.00044964336691943885, 0.00035968893193183415], 'inf_pr': [2.894223774807525e-05, 1.5889721698025827e-05, 5.2431605542135884e-05], 'mu': [0.1, 0.1, 0.002828427124746191], 'obj': [84.04608400286114, 84.04201614167572, 84.0400557191809], 'regularization_size': [0.0, 0.0, 0.0]}, 'n_call_callback_fun': 0, 'n_call_nlp_f': 3, 'n_call_nlp_g': 3, 'n_call_nlp_grad': 0, 'n_call_nlp_grad_f': 4, 'n_call_nlp_hess_l': 2, 'n_call_nlp_jac_g': 4, 'n_call_total': 1, 'return_status': 'Maximum_Iterations_Exceeded', 'success': False, 't_proc_callback_fun': 0.0, 't_proc_nlp_f': 5.3e-05, 't_proc_nlp_g': 0.005687, 't_proc_nlp_grad': 0.0, 't_proc_nlp_grad_f': 9.999999999999999e-05, 't_proc_nlp_hess_l': 1.560397, 't_proc_nlp_jac_g': 0.148258, 't_proc_total': 1.718518, 't_wall_callback_fun': 0.0, 't_wall_nlp_f': 4.7085e-05, 't_wall_nlp_g': 0.005711346, 't_wall_nlp_grad': 0.0, 't_wall_nlp_grad_f': 0.000100641, 't_wall_nlp_hess_l': 1.5606603909999999, 't_wall_nlp_jac_g': 0.148311895, 't_wall_total': 1.718788002, 'unified_return_status': 'SOLVER_RET_LIMITED'}\n",
      "Solver fails under iter 2 return last iteration results!\n",
      "Setting the init for x\n",
      "Settiing the init for u\n",
      "      solver  :   t_proc      (avg)   t_wall      (avg)    n_eval\n",
      "       nlp_f  |  52.00us ( 17.33us)  46.85us ( 15.62us)         3\n",
      "       nlp_g  |   5.71ms (  1.90ms)   5.72ms (  1.91ms)         3\n",
      "  nlp_grad_f  | 104.00us ( 26.00us) 105.28us ( 26.32us)         4\n",
      "  nlp_hess_l  |   1.51 s (755.14ms)   1.51 s (755.96ms)         2\n",
      "   nlp_jac_g  | 146.85ms ( 36.71ms) 146.93ms ( 36.73ms)         4\n",
      "       total  |   1.67 s (  1.67 s)   1.67 s (  1.67 s)         1\n",
      "{'iter_count': 2, 'iterations': {'alpha_du': [0.0, 1.0, 1.0], 'alpha_pr': [0.0, 1.0, 1.0], 'd_norm': [0.0, 0.05119604066954056, 0.07825834852495236], 'inf_du': [0.006983704133827259, 1.9097175131488342e-05, 0.0004855454921780522], 'inf_pr': [5.2431605542135884e-05, 1.4357039036183572e-05, 8.452499693201165e-05], 'mu': [0.1, 0.1, 0.002828427124746191], 'obj': [83.91600258605393, 83.91195812906163, 83.90934029581653], 'regularization_size': [0.0, 0.0, 0.0]}, 'n_call_callback_fun': 0, 'n_call_nlp_f': 3, 'n_call_nlp_g': 3, 'n_call_nlp_grad': 0, 'n_call_nlp_grad_f': 4, 'n_call_nlp_hess_l': 2, 'n_call_nlp_jac_g': 4, 'n_call_total': 1, 'return_status': 'Maximum_Iterations_Exceeded', 'success': False, 't_proc_callback_fun': 0.0, 't_proc_nlp_f': 5.2000000000000004e-05, 't_proc_nlp_g': 0.00571, 't_proc_nlp_grad': 0.0, 't_proc_nlp_grad_f': 0.000104, 't_proc_nlp_hess_l': 1.5102829999999998, 't_proc_nlp_jac_g': 0.146847, 't_proc_total': 1.666944, 't_wall_callback_fun': 0.0, 't_wall_nlp_f': 4.6847e-05, 't_wall_nlp_g': 0.005721555, 't_wall_nlp_grad': 0.0, 't_wall_nlp_grad_f': 0.000105283, 't_wall_nlp_hess_l': 1.5119230190000001, 't_wall_nlp_jac_g': 0.14693461, 't_wall_total': 1.668616821, 'unified_return_status': 'SOLVER_RET_LIMITED'}\n",
      "Solver fails under iter 2 return last iteration results!\n",
      "Setting the init for x\n",
      "Settiing the init for u\n",
      "      solver  :   t_proc      (avg)   t_wall      (avg)    n_eval\n",
      "       nlp_f  |  49.00us ( 16.33us)  45.98us ( 15.33us)         3\n",
      "       nlp_g  |   5.83ms (  1.94ms)   5.83ms (  1.94ms)         3\n",
      "  nlp_grad_f  |  99.00us ( 24.75us)  99.20us ( 24.80us)         4\n",
      "  nlp_hess_l  |   1.58 s (791.82ms)   1.58 s (791.75ms)         2\n",
      "   nlp_jac_g  | 148.71ms ( 37.18ms) 148.76ms ( 37.19ms)         4\n",
      "       total  |   1.74 s (  1.74 s)   1.74 s (  1.74 s)         1\n",
      "{'iter_count': 2, 'iterations': {'alpha_du': [0.0, 1.0, 0.9929272467241974], 'alpha_pr': [0.0, 1.0, 1.0], 'd_norm': [0.0, 0.04905303239416077, 0.10252336639966074], 'inf_du': [0.0068549298553484935, 9.999680416150625e-05, 0.0006207808755059885], 'inf_pr': [8.452499693201165e-05, 1.297241745190636e-05, 0.00012295314909605004], 'mu': [0.1, 0.1, 0.002828427124746191], 'obj': [83.85010336496414, 83.84609386965124, 83.84278980023345], 'regularization_size': [0.0, 0.0, 0.0]}, 'n_call_callback_fun': 0, 'n_call_nlp_f': 3, 'n_call_nlp_g': 3, 'n_call_nlp_grad': 0, 'n_call_nlp_grad_f': 4, 'n_call_nlp_hess_l': 2, 'n_call_nlp_jac_g': 4, 'n_call_total': 1, 'return_status': 'Maximum_Iterations_Exceeded', 'success': False, 't_proc_callback_fun': 0.0, 't_proc_nlp_f': 4.9e-05, 't_proc_nlp_g': 0.005827000000000001, 't_proc_nlp_grad': 0.0, 't_proc_nlp_grad_f': 9.900000000000001e-05, 't_proc_nlp_hess_l': 1.583634, 't_proc_nlp_jac_g': 0.14871, 't_proc_total': 1.742403, 't_wall_callback_fun': 0.0, 't_wall_nlp_f': 4.5984e-05, 't_wall_nlp_g': 0.005831294, 't_wall_nlp_grad': 0.0, 't_wall_nlp_grad_f': 9.9199e-05, 't_wall_nlp_hess_l': 1.583492594, 't_wall_nlp_jac_g': 0.14875502200000001, 't_wall_total': 1.742243033, 'unified_return_status': 'SOLVER_RET_LIMITED'}\n",
      "Solver fails under iter 2 return last iteration results!\n",
      "Setting the init for x\n",
      "Settiing the init for u\n",
      "      solver  :   t_proc      (avg)   t_wall      (avg)    n_eval\n",
      "       nlp_f  |  53.00us ( 17.67us)  48.63us ( 16.21us)         3\n",
      "       nlp_g  |   5.83ms (  1.94ms)   5.84ms (  1.95ms)         3\n",
      "  nlp_grad_f  | 109.00us ( 27.25us) 108.92us ( 27.23us)         4\n",
      "  nlp_hess_l  |   1.58 s (789.79ms)   1.58 s (789.91ms)         2\n",
      "   nlp_jac_g  | 151.80ms ( 37.95ms) 151.85ms ( 37.96ms)         4\n",
      "       total  |   1.74 s (  1.74 s)   1.74 s (  1.74 s)         1\n",
      "{'iter_count': 2, 'iterations': {'alpha_du': [0.0, 1.0, 0.9837396394354861], 'alpha_pr': [0.0, 1.0, 1.0], 'd_norm': [0.0, 0.047015255054810266, 0.13572284989961494], 'inf_du': [0.006709595572821975, 6.111345843595739e-05, 0.00079254048623012], 'inf_pr': [0.00012295314909605004, 1.1719606516746861e-05, 0.00016236915962730691], 'mu': [0.1, 0.1, 0.002828427124746191], 'obj': [83.8362753607001, 83.83217603114346, 83.8282417235014], 'regularization_size': [0.0, 0.0, 0.0]}, 'n_call_callback_fun': 0, 'n_call_nlp_f': 3, 'n_call_nlp_g': 3, 'n_call_nlp_grad': 0, 'n_call_nlp_grad_f': 4, 'n_call_nlp_hess_l': 2, 'n_call_nlp_jac_g': 4, 'n_call_total': 1, 'return_status': 'Maximum_Iterations_Exceeded', 'success': False, 't_proc_callback_fun': 0.0, 't_proc_nlp_f': 5.3e-05, 't_proc_nlp_g': 0.005834000000000001, 't_proc_nlp_grad': 0.0, 't_proc_nlp_grad_f': 0.00010899999999999999, 't_proc_nlp_hess_l': 1.579574, 't_proc_nlp_jac_g': 0.151798, 't_proc_total': 1.741547, 't_wall_callback_fun': 0.0, 't_wall_nlp_f': 4.8629e-05, 't_wall_nlp_g': 0.005837508, 't_wall_nlp_grad': 0.0, 't_wall_nlp_grad_f': 0.000108915, 't_wall_nlp_hess_l': 1.5798150450000001, 't_wall_nlp_jac_g': 0.151848977, 't_wall_total': 1.741765092, 'unified_return_status': 'SOLVER_RET_LIMITED'}\n",
      "Solver fails under iter 2 return last iteration results!\n",
      "Setting the init for x\n",
      "Settiing the init for u\n",
      "      solver  :   t_proc      (avg)   t_wall      (avg)    n_eval\n",
      "       nlp_f  |  59.00us ( 19.67us)  53.80us ( 17.94us)         3\n",
      "       nlp_g  |   5.92ms (  1.97ms)   5.93ms (  1.98ms)         3\n",
      "  nlp_grad_f  | 106.00us ( 26.50us) 107.21us ( 26.80us)         4\n",
      "  nlp_hess_l  |   1.63 s (817.30ms)   1.64 s (817.75ms)         2\n",
      "   nlp_jac_g  | 152.57ms ( 38.14ms) 152.74ms ( 38.19ms)         4\n",
      "       total  |   1.80 s (  1.80 s)   1.80 s (  1.80 s)         1\n",
      "{'iter_count': 2, 'iterations': {'alpha_du': [0.0, 1.0, 0.97598474638269], 'alpha_pr': [0.0, 1.0, 1.0], 'd_norm': [0.0, 0.04506286555613352, 0.16553958295585636], 'inf_du': [0.006549513870111282, 1.3498112236665083e-05, 0.0009639978725570764], 'inf_pr': [0.00016236915962730691, 1.0577783757570458e-05, 0.0002047090861416745], 'mu': [0.1, 0.1, 0.002828427124746191], 'obj': [83.85971784174275, 83.85539227156097, 83.85095222860082], 'regularization_size': [0.0, 0.0, 0.0]}, 'n_call_callback_fun': 0, 'n_call_nlp_f': 3, 'n_call_nlp_g': 3, 'n_call_nlp_grad': 0, 'n_call_nlp_grad_f': 4, 'n_call_nlp_hess_l': 2, 'n_call_nlp_jac_g': 4, 'n_call_total': 1, 'return_status': 'Maximum_Iterations_Exceeded', 'success': False, 't_proc_callback_fun': 0.0, 't_proc_nlp_f': 5.9e-05, 't_proc_nlp_g': 0.005921000000000001, 't_proc_nlp_grad': 0.0, 't_proc_nlp_grad_f': 0.000106, 't_proc_nlp_hess_l': 1.6345960000000002, 't_proc_nlp_jac_g': 0.152571, 't_proc_total': 1.797477, 't_wall_callback_fun': 0.0, 't_wall_nlp_f': 5.3805e-05, 't_wall_nlp_g': 0.005925592, 't_wall_nlp_grad': 0.0, 't_wall_nlp_grad_f': 0.000107208, 't_wall_nlp_hess_l': 1.6354914759999999, 't_wall_nlp_jac_g': 0.152743285, 't_wall_total': 1.798472735, 'unified_return_status': 'SOLVER_RET_LIMITED'}\n",
      "Solver fails under iter 2 return last iteration results!\n",
      "Setting the init for x\n",
      "Settiing the init for u\n",
      "      solver  :   t_proc      (avg)   t_wall      (avg)    n_eval\n",
      "       nlp_f  |  59.00us ( 19.67us)  51.38us ( 17.13us)         3\n",
      "       nlp_g  |   6.12ms (  2.04ms)   6.12ms (  2.04ms)         3\n",
      "  nlp_grad_f  | 102.00us ( 25.50us) 101.65us ( 25.41us)         4\n",
      "  nlp_hess_l  |   1.64 s (817.55ms)   1.64 s (817.96ms)         2\n",
      "   nlp_jac_g  | 154.24ms ( 38.56ms) 154.38ms ( 38.60ms)         4\n",
      "       total  |   1.80 s (  1.80 s)   1.80 s (  1.80 s)         1\n",
      "{'iter_count': 2, 'iterations': {'alpha_du': [0.0, 1.0, 0.9689647259981335], 'alpha_pr': [0.0, 1.0, 1.0], 'd_norm': [0.0, 0.04316709685106153, 0.18981105055501937], 'inf_du': [0.006373419714288842, 1.6304169519532064e-05, 0.0012072334448875108], 'inf_pr': [0.0002047090861416745, 9.524115896331065e-06, 0.0002358694452331278], 'mu': [0.1, 0.1, 0.002828427124746191], 'obj': [83.90809739082576, 83.90345611724099, 83.89868160703536], 'regularization_size': [0.0, 0.0, 0.0]}, 'n_call_callback_fun': 0, 'n_call_nlp_f': 3, 'n_call_nlp_g': 3, 'n_call_nlp_grad': 0, 'n_call_nlp_grad_f': 4, 'n_call_nlp_hess_l': 2, 'n_call_nlp_jac_g': 4, 'n_call_total': 1, 'return_status': 'Maximum_Iterations_Exceeded', 'success': False, 't_proc_callback_fun': 0.0, 't_proc_nlp_f': 5.9e-05, 't_proc_nlp_g': 0.006116999999999999, 't_proc_nlp_grad': 0.0, 't_proc_nlp_grad_f': 0.000102, 't_proc_nlp_hess_l': 1.635093, 't_proc_nlp_jac_g': 0.154244, 't_proc_total': 1.799995, 't_wall_callback_fun': 0.0, 't_wall_nlp_f': 5.1376000000000004e-05, 't_wall_nlp_g': 0.0061213150000000004, 't_wall_nlp_grad': 0.0, 't_wall_nlp_grad_f': 0.000101653, 't_wall_nlp_hess_l': 1.635913872, 't_wall_nlp_jac_g': 0.154383399, 't_wall_total': 1.800885547, 'unified_return_status': 'SOLVER_RET_LIMITED'}\n",
      "Solver fails under iter 2 return last iteration results!\n",
      "Setting the init for x\n",
      "Settiing the init for u\n",
      "      solver  :   t_proc      (avg)   t_wall      (avg)    n_eval\n",
      "       nlp_f  |  54.00us ( 18.00us)  48.46us ( 16.15us)         3\n",
      "       nlp_g  |   5.91ms (  1.97ms)   5.91ms (  1.97ms)         3\n",
      "  nlp_grad_f  | 109.00us ( 27.25us) 107.69us ( 26.92us)         4\n",
      "  nlp_hess_l  |   1.60 s (797.52ms)   1.60 s (797.52ms)         2\n",
      "   nlp_jac_g  | 151.05ms ( 37.76ms) 151.10ms ( 37.77ms)         4\n",
      "       total  |   1.76 s (  1.76 s)   1.76 s (  1.76 s)         1\n",
      "{'iter_count': 2, 'iterations': {'alpha_du': [0.0, 1.0, 0.9614477532852784], 'alpha_pr': [0.0, 1.0, 1.0], 'd_norm': [0.0, 0.04129270219463315, 0.21082933362234618], 'inf_du': [0.006183775749322362, 1.6253085016515456e-05, 0.0015194439839765483], 'inf_pr': [0.0002358694452331278, 8.540672817691775e-06, 0.0002613419106317627], 'mu': [0.1, 0.1, 0.002828427124746191], 'obj': [83.96992149498953, 83.96495571232163, 83.96000317938744], 'regularization_size': [0.0, 0.0, 0.0]}, 'n_call_callback_fun': 0, 'n_call_nlp_f': 3, 'n_call_nlp_g': 3, 'n_call_nlp_grad': 0, 'n_call_nlp_grad_f': 4, 'n_call_nlp_hess_l': 2, 'n_call_nlp_jac_g': 4, 'n_call_total': 1, 'return_status': 'Maximum_Iterations_Exceeded', 'success': False, 't_proc_callback_fun': 0.0, 't_proc_nlp_f': 5.4e-05, 't_proc_nlp_g': 0.005907, 't_proc_nlp_grad': 0.0, 't_proc_nlp_grad_f': 0.000109, 't_proc_nlp_hess_l': 1.59504, 't_proc_nlp_jac_g': 0.15104800000000002, 't_proc_total': 1.756325, 't_wall_callback_fun': 0.0, 't_wall_nlp_f': 4.8455e-05, 't_wall_nlp_g': 0.005906701, 't_wall_nlp_grad': 0.0, 't_wall_nlp_grad_f': 0.00010769, 't_wall_nlp_hess_l': 1.595041237, 't_wall_nlp_jac_g': 0.151098342, 't_wall_total': 1.756307618, 'unified_return_status': 'SOLVER_RET_LIMITED'}\n",
      "Solver fails under iter 2 return last iteration results!\n",
      "Setting the init for x\n",
      "Settiing the init for u\n",
      "      solver  :   t_proc      (avg)   t_wall      (avg)    n_eval\n",
      "       nlp_f  |  54.00us ( 18.00us)  48.26us ( 16.09us)         3\n",
      "       nlp_g  |   5.84ms (  1.95ms)   5.85ms (  1.95ms)         3\n",
      "  nlp_grad_f  | 108.00us ( 27.00us) 107.70us ( 26.93us)         4\n",
      "  nlp_hess_l  |   1.59 s (795.19ms)   1.59 s (795.64ms)         2\n",
      "   nlp_jac_g  | 151.94ms ( 37.98ms) 152.06ms ( 38.01ms)         4\n",
      "       total  |   1.75 s (  1.75 s)   1.75 s (  1.75 s)         1\n",
      "{'iter_count': 2, 'iterations': {'alpha_du': [0.0, 1.0, 0.9539497708769727], 'alpha_pr': [0.0, 1.0, 1.0], 'd_norm': [0.0, 0.03943249219355757, 0.22612898943575332], 'inf_du': [0.005986981062235527, 1.8200723048367173e-05, 0.0018463375024956805], 'inf_pr': [0.0002613419106317627, 7.62632213996417e-06, 0.0002763051871250699], 'mu': [0.1, 0.1, 0.002828427124746191], 'obj': [84.03370020634598, 84.02845716482314, 84.02346251808709], 'regularization_size': [0.0, 0.0, 0.0]}, 'n_call_callback_fun': 0, 'n_call_nlp_f': 3, 'n_call_nlp_g': 3, 'n_call_nlp_grad': 0, 'n_call_nlp_grad_f': 4, 'n_call_nlp_hess_l': 2, 'n_call_nlp_jac_g': 4, 'n_call_total': 1, 'return_status': 'Maximum_Iterations_Exceeded', 'success': False, 't_proc_callback_fun': 0.0, 't_proc_nlp_f': 5.4e-05, 't_proc_nlp_g': 0.005839, 't_proc_nlp_grad': 0.0, 't_proc_nlp_grad_f': 0.000108, 't_proc_nlp_hess_l': 1.590377, 't_proc_nlp_jac_g': 0.151938, 't_proc_total': 1.752423, 't_wall_callback_fun': 0.0, 't_wall_nlp_f': 4.8264e-05, 't_wall_nlp_g': 0.005854643, 't_wall_nlp_grad': 0.0, 't_wall_nlp_grad_f': 0.00010770199999999999, 't_wall_nlp_hess_l': 1.591274066, 't_wall_nlp_jac_g': 0.152055015, 't_wall_total': 1.753375442, 'unified_return_status': 'SOLVER_RET_LIMITED'}\n",
      "Solver fails under iter 2 return last iteration results!\n",
      "Setting the init for x\n",
      "Settiing the init for u\n",
      "      solver  :   t_proc      (avg)   t_wall      (avg)    n_eval\n",
      "       nlp_f  |  53.00us ( 17.67us)  47.59us ( 15.86us)         3\n",
      "       nlp_g  |   6.38ms (  2.13ms)   6.38ms (  2.13ms)         3\n",
      "  nlp_grad_f  | 120.00us ( 30.00us) 119.84us ( 29.96us)         4\n",
      "  nlp_hess_l  |   1.53 s (764.83ms)   1.53 s (765.69ms)         2\n",
      "   nlp_jac_g  | 152.77ms ( 38.19ms) 152.95ms ( 38.24ms)         4\n",
      "       total  |   1.69 s (  1.69 s)   1.69 s (  1.69 s)         1\n",
      "{'iter_count': 2, 'iterations': {'alpha_du': [0.0, 1.0, 0.9465437278016873], 'alpha_pr': [0.0, 1.0, 1.0], 'd_norm': [0.0, 0.03757775255862818, 0.2359433197468716], 'inf_du': [0.005785371384083291, 3.900036694248765e-05, 0.002195338871571917], 'inf_pr': [0.0002763051871250699, 6.777070895802595e-06, 0.00027192431974076836], 'mu': [0.1, 0.1, 0.002828427124746191], 'obj': [84.0889748669294, 84.08356054451478, 84.07862439228349], 'regularization_size': [0.0, 0.0, 0.0]}, 'n_call_callback_fun': 0, 'n_call_nlp_f': 3, 'n_call_nlp_g': 3, 'n_call_nlp_grad': 0, 'n_call_nlp_grad_f': 4, 'n_call_nlp_hess_l': 2, 'n_call_nlp_jac_g': 4, 'n_call_total': 1, 'return_status': 'Maximum_Iterations_Exceeded', 'success': False, 't_proc_callback_fun': 0.0, 't_proc_nlp_f': 5.3e-05, 't_proc_nlp_g': 0.006378, 't_proc_nlp_grad': 0.0, 't_proc_nlp_grad_f': 0.00011999999999999999, 't_proc_nlp_hess_l': 1.5296560000000001, 't_proc_nlp_jac_g': 0.152772, 't_proc_total': 1.693059, 't_wall_callback_fun': 0.0, 't_wall_nlp_f': 4.7592e-05, 't_wall_nlp_g': 0.006384504, 't_wall_nlp_grad': 0.0, 't_wall_nlp_grad_f': 0.00011983799999999999, 't_wall_nlp_hess_l': 1.531389317, 't_wall_nlp_jac_g': 0.152950119, 't_wall_total': 1.694897245, 'unified_return_status': 'SOLVER_RET_LIMITED'}\n",
      "Solver fails under iter 2 return last iteration results!\n",
      "Setting the init for x\n",
      "Settiing the init for u\n",
      "      solver  :   t_proc      (avg)   t_wall      (avg)    n_eval\n",
      "       nlp_f  |  54.00us ( 18.00us)  49.11us ( 16.37us)         3\n",
      "       nlp_g  |   5.74ms (  1.91ms)   5.75ms (  1.92ms)         3\n",
      "  nlp_grad_f  | 100.00us ( 25.00us) 100.31us ( 25.08us)         4\n",
      "  nlp_hess_l  |   1.56 s (781.64ms)   1.56 s (781.64ms)         2\n",
      "   nlp_jac_g  | 178.23ms ( 44.56ms) 178.27ms ( 44.57ms)         4\n",
      "       total  |   1.75 s (  1.75 s)   1.75 s (  1.75 s)         1\n",
      "{'iter_count': 2, 'iterations': {'alpha_du': [0.0, 1.0, 0.9398980332789194], 'alpha_pr': [0.0, 1.0, 1.0], 'd_norm': [0.0, 0.03571547157117704, 0.23960231218326397], 'inf_du': [0.005582679700217423, 6.205310964935151e-05, 0.002556116851479051], 'inf_pr': [0.00027192431974076836, 5.990060643945583e-06, 0.0002546823180827884], 'mu': [0.1, 0.1, 0.002828427124746191], 'obj': [84.12761999217042, 84.12218189151206, 84.11739579822036], 'regularization_size': [0.0, 0.0, 0.0]}, 'n_call_callback_fun': 0, 'n_call_nlp_f': 3, 'n_call_nlp_g': 3, 'n_call_nlp_grad': 0, 'n_call_nlp_grad_f': 4, 'n_call_nlp_hess_l': 2, 'n_call_nlp_jac_g': 4, 'n_call_total': 1, 'return_status': 'Maximum_Iterations_Exceeded', 'success': False, 't_proc_callback_fun': 0.0, 't_proc_nlp_f': 5.4e-05, 't_proc_nlp_g': 0.005743000000000001, 't_proc_nlp_grad': 0.0, 't_proc_nlp_grad_f': 9.999999999999999e-05, 't_proc_nlp_hess_l': 1.5632769999999998, 't_proc_nlp_jac_g': 0.178232, 't_proc_total': 1.75147, 't_wall_callback_fun': 0.0, 't_wall_nlp_f': 4.9106e-05, 't_wall_nlp_g': 0.005746070000000001, 't_wall_nlp_grad': 0.0, 't_wall_nlp_grad_f': 0.000100311, 't_wall_nlp_hess_l': 1.5632729580000002, 't_wall_nlp_jac_g': 0.178274495, 't_wall_total': 1.751444302, 'unified_return_status': 'SOLVER_RET_LIMITED'}\n",
      "Solver fails under iter 2 return last iteration results!\n",
      "Setting the init for x\n",
      "Settiing the init for u\n",
      "      solver  :   t_proc      (avg)   t_wall      (avg)    n_eval\n",
      "       nlp_f  |  51.00us ( 17.00us)  48.17us ( 16.06us)         3\n",
      "       nlp_g  |   5.80ms (  1.93ms)   5.80ms (  1.93ms)         3\n",
      "  nlp_grad_f  | 118.00us ( 29.50us) 118.46us ( 29.62us)         4\n",
      "  nlp_hess_l  |   1.61 s (804.96ms)   1.61 s (805.67ms)         2\n",
      "   nlp_jac_g  | 149.16ms ( 37.29ms) 149.24ms ( 37.31ms)         4\n",
      "       total  |   1.77 s (  1.77 s)   1.77 s (  1.77 s)         1\n",
      "{'iter_count': 2, 'iterations': {'alpha_du': [0.0, 1.0, 0.9349666032769468], 'alpha_pr': [0.0, 1.0, 1.0], 'd_norm': [0.0, 0.033874411686990215, 0.23649314805318977], 'inf_du': [0.005383633476976142, 8.983298692399888e-05, 0.0028718000005659577], 'inf_pr': [0.0002546823180827884, 5.273599005983787e-06, 0.00023187549541658914], 'mu': [0.1, 0.1, 0.002828427124746191], 'obj': [84.14446114584877, 84.13912071463315, 84.13458027824029], 'regularization_size': [0.0, 0.0, 0.0]}, 'n_call_callback_fun': 0, 'n_call_nlp_f': 3, 'n_call_nlp_g': 3, 'n_call_nlp_grad': 0, 'n_call_nlp_grad_f': 4, 'n_call_nlp_hess_l': 2, 'n_call_nlp_jac_g': 4, 'n_call_total': 1, 'return_status': 'Maximum_Iterations_Exceeded', 'success': False, 't_proc_callback_fun': 0.0, 't_proc_nlp_f': 5.1e-05, 't_proc_nlp_g': 0.0058, 't_proc_nlp_grad': 0.0, 't_proc_nlp_grad_f': 0.00011799999999999998, 't_proc_nlp_hess_l': 1.609917, 't_proc_nlp_jac_g': 0.149163, 't_proc_total': 1.769141, 't_wall_callback_fun': 0.0, 't_wall_nlp_f': 4.8169999999999995e-05, 't_wall_nlp_g': 0.005802476000000001, 't_wall_nlp_grad': 0.0, 't_wall_nlp_grad_f': 0.000118463, 't_wall_nlp_hess_l': 1.611348798, 't_wall_nlp_jac_g': 0.149237103, 't_wall_total': 1.770582218, 'unified_return_status': 'SOLVER_RET_LIMITED'}\n",
      "Solver fails under iter 2 return last iteration results!\n",
      "Setting the init for x\n",
      "Settiing the init for u\n",
      "      solver  :   t_proc      (avg)   t_wall      (avg)    n_eval\n",
      "       nlp_f  |  68.00us ( 22.67us)  58.60us ( 19.53us)         3\n",
      "       nlp_g  |   6.51ms (  2.17ms)   6.53ms (  2.18ms)         3\n",
      "  nlp_grad_f  | 117.00us ( 29.25us) 116.81us ( 29.20us)         4\n",
      "  nlp_hess_l  |   1.64 s (819.91ms)   1.64 s (820.71ms)         2\n",
      "   nlp_jac_g  | 156.07ms ( 39.02ms) 156.15ms ( 39.04ms)         4\n",
      "       total  |   1.81 s (  1.81 s)   1.81 s (  1.81 s)         1\n",
      "{'iter_count': 2, 'iterations': {'alpha_du': [0.0, 1.0, 0.9319327250539019], 'alpha_pr': [0.0, 1.0, 1.0], 'd_norm': [0.0, 0.03203406096028988, 0.22873892218355207], 'inf_du': [0.005189938176084401, 0.00011719115494568388, 0.003105078998444491], 'inf_pr': [0.00023187549541658914, 5.68166968251127e-06, 0.00020556945420568962], 'mu': [0.1, 0.1, 0.002828427124746191], 'obj': [84.13716223160779, 84.13202510583764, 84.12780496501196], 'regularization_size': [0.0, 0.0, 0.0]}, 'n_call_callback_fun': 0, 'n_call_nlp_f': 3, 'n_call_nlp_g': 3, 'n_call_nlp_grad': 0, 'n_call_nlp_grad_f': 4, 'n_call_nlp_hess_l': 2, 'n_call_nlp_jac_g': 4, 'n_call_total': 1, 'return_status': 'Maximum_Iterations_Exceeded', 'success': False, 't_proc_callback_fun': 0.0, 't_proc_nlp_f': 6.8e-05, 't_proc_nlp_g': 0.006508999999999999, 't_proc_nlp_grad': 0.0, 't_proc_nlp_grad_f': 0.000117, 't_proc_nlp_hess_l': 1.639811, 't_proc_nlp_jac_g': 0.156075, 't_proc_total': 1.807702, 't_wall_callback_fun': 0.0, 't_wall_nlp_f': 5.86e-05, 't_wall_nlp_g': 0.006530943, 't_wall_nlp_grad': 0.0, 't_wall_nlp_grad_f': 0.000116813, 't_wall_nlp_hess_l': 1.641415061, 't_wall_nlp_jac_g': 0.15614730799999998, 't_wall_total': 1.80932656, 'unified_return_status': 'SOLVER_RET_LIMITED'}\n",
      "Solver fails under iter 2 return last iteration results!\n",
      "Setting the init for x\n",
      "Settiing the init for u\n",
      "      solver  :   t_proc      (avg)   t_wall      (avg)    n_eval\n",
      "       nlp_f  |  52.00us ( 17.33us)  47.61us ( 15.87us)         3\n",
      "       nlp_g  |   5.71ms (  1.90ms)   5.71ms (  1.90ms)         3\n",
      "  nlp_grad_f  | 108.00us ( 27.00us) 109.55us ( 27.39us)         4\n",
      "  nlp_hess_l  |   1.61 s (802.94ms)   1.61 s (802.95ms)         2\n",
      "   nlp_jac_g  | 147.15ms ( 36.79ms) 147.19ms ( 36.80ms)         4\n",
      "       total  |   1.76 s (  1.76 s)   1.76 s (  1.76 s)         1\n",
      "{'iter_count': 2, 'iterations': {'alpha_du': [0.0, 1.0, 0.9313546286625042], 'alpha_pr': [0.0, 1.0, 1.0], 'd_norm': [0.0, 0.03020963977897738, 0.2172531205661788], 'inf_du': [0.005002549630713211, 0.0001461416185064568, 0.0031979920874832604], 'inf_pr': [0.00020556945420568962, 6.0175962377506664e-06, 0.00017578950553820416], 'mu': [0.1, 0.1, 0.002828427124746191], 'obj': [84.10567059000456, 84.10079936795354, 84.09695195117541], 'regularization_size': [0.0, 0.0, 0.0]}, 'n_call_callback_fun': 0, 'n_call_nlp_f': 3, 'n_call_nlp_g': 3, 'n_call_nlp_grad': 0, 'n_call_nlp_grad_f': 4, 'n_call_nlp_hess_l': 2, 'n_call_nlp_jac_g': 4, 'n_call_total': 1, 'return_status': 'Maximum_Iterations_Exceeded', 'success': False, 't_proc_callback_fun': 0.0, 't_proc_nlp_f': 5.2000000000000004e-05, 't_proc_nlp_g': 0.005705999999999999, 't_proc_nlp_grad': 0.0, 't_proc_nlp_grad_f': 0.00010800000000000001, 't_proc_nlp_hess_l': 1.605885, 't_proc_nlp_jac_g': 0.147147, 't_proc_total': 1.762926, 't_wall_callback_fun': 0.0, 't_wall_nlp_f': 4.7605e-05, 't_wall_nlp_g': 0.005708949, 't_wall_nlp_grad': 0.0, 't_wall_nlp_grad_f': 0.00010955100000000001, 't_wall_nlp_hess_l': 1.605898266, 't_wall_nlp_jac_g': 0.147191722, 't_wall_total': 1.762921764, 'unified_return_status': 'SOLVER_RET_LIMITED'}\n",
      "Solver fails under iter 2 return last iteration results!\n",
      "Setting the init for x\n",
      "Settiing the init for u\n",
      "      solver  :   t_proc      (avg)   t_wall      (avg)    n_eval\n",
      "       nlp_f  |  56.00us ( 18.67us)  51.58us ( 17.19us)         3\n",
      "       nlp_g  |   5.82ms (  1.94ms)   5.83ms (  1.94ms)         3\n",
      "  nlp_grad_f  | 106.00us ( 26.50us) 105.81us ( 26.45us)         4\n",
      "  nlp_hess_l  |   1.56 s (780.79ms)   1.56 s (781.32ms)         2\n",
      "   nlp_jac_g  | 150.87ms ( 37.72ms) 150.98ms ( 37.74ms)         4\n",
      "       total  |   1.72 s (  1.72 s)   1.72 s (  1.72 s)         1\n",
      "{'iter_count': 2, 'iterations': {'alpha_du': [0.0, 1.0, 0.9333366014363513], 'alpha_pr': [0.0, 1.0, 1.0], 'd_norm': [0.0, 0.02894841622103144, 0.2034407780311455], 'inf_du': [0.004824934122848211, 0.0001713634881218562, 0.003138924903958229], 'inf_pr': [0.00017578950553820416, 6.202295073087782e-06, 0.00014813907847754937], 'mu': [0.1, 0.1, 0.002828427124746191], 'obj': [84.05157146899404, 84.04700140051696, 84.04352936169282], 'regularization_size': [0.0, 0.0, 0.0]}, 'n_call_callback_fun': 0, 'n_call_nlp_f': 3, 'n_call_nlp_g': 3, 'n_call_nlp_grad': 0, 'n_call_nlp_grad_f': 4, 'n_call_nlp_hess_l': 2, 'n_call_nlp_jac_g': 4, 'n_call_total': 1, 'return_status': 'Maximum_Iterations_Exceeded', 'success': False, 't_proc_callback_fun': 0.0, 't_proc_nlp_f': 5.6e-05, 't_proc_nlp_g': 0.0058200000000000005, 't_proc_nlp_grad': 0.0, 't_proc_nlp_grad_f': 0.000106, 't_proc_nlp_hess_l': 1.561576, 't_proc_nlp_jac_g': 0.150869, 't_proc_total': 1.722562, 't_wall_callback_fun': 0.0, 't_wall_nlp_f': 5.1575999999999995e-05, 't_wall_nlp_g': 0.0058342409999999996, 't_wall_nlp_grad': 0.0, 't_wall_nlp_grad_f': 0.00010580700000000001, 't_wall_nlp_hess_l': 1.562632488, 't_wall_nlp_jac_g': 0.150978105, 't_wall_total': 1.723676847, 'unified_return_status': 'SOLVER_RET_LIMITED'}\n",
      "Solver fails under iter 2 return last iteration results!\n",
      "Setting the init for x\n",
      "Settiing the init for u\n",
      "      solver  :   t_proc      (avg)   t_wall      (avg)    n_eval\n",
      "       nlp_f  |  63.00us ( 21.00us)  57.45us ( 19.15us)         3\n",
      "       nlp_g  |   6.96ms (  2.32ms)   6.98ms (  2.33ms)         3\n",
      "  nlp_grad_f  | 109.00us ( 27.25us) 108.86us ( 27.22us)         4\n",
      "  nlp_hess_l  |   1.59 s (793.89ms)   1.59 s (793.92ms)         2\n",
      "   nlp_jac_g  | 149.36ms ( 37.34ms) 149.42ms ( 37.35ms)         4\n",
      "       total  |   1.75 s (  1.75 s)   1.75 s (  1.75 s)         1\n",
      "{'iter_count': 2, 'iterations': {'alpha_du': [0.0, 1.0, 0.9368520978986697], 'alpha_pr': [0.0, 1.0, 1.0], 'd_norm': [0.0, 0.02911571072953844, 0.19030195833592478], 'inf_du': [0.004654538734514179, 0.0001878684577379941, 0.0029686046316088413], 'inf_pr': [0.00014813907847754937, 6.090469022557166e-06, 0.00012510066536908226], 'mu': [0.1, 0.1, 0.002828427124746191], 'obj': [83.97734188213695, 83.97307191610163, 83.96993939852538], 'regularization_size': [0.0, 0.0, 0.0]}, 'n_call_callback_fun': 0, 'n_call_nlp_f': 3, 'n_call_nlp_g': 3, 'n_call_nlp_grad': 0, 'n_call_nlp_grad_f': 4, 'n_call_nlp_hess_l': 2, 'n_call_nlp_jac_g': 4, 'n_call_total': 1, 'return_status': 'Maximum_Iterations_Exceeded', 'success': False, 't_proc_callback_fun': 0.0, 't_proc_nlp_f': 6.3e-05, 't_proc_nlp_g': 0.006959, 't_proc_nlp_grad': 0.0, 't_proc_nlp_grad_f': 0.000109, 't_proc_nlp_hess_l': 1.587782, 't_proc_nlp_jac_g': 0.149364, 't_proc_total': 1.748436, 't_wall_callback_fun': 0.0, 't_wall_nlp_f': 5.7455e-05, 't_wall_nlp_g': 0.006977723, 't_wall_nlp_grad': 0.0, 't_wall_nlp_grad_f': 0.000108861, 't_wall_nlp_hess_l': 1.587846629, 't_wall_nlp_jac_g': 0.14941857, 't_wall_total': 1.748490384, 'unified_return_status': 'SOLVER_RET_LIMITED'}\n",
      "Solver fails under iter 2 return last iteration results!\n",
      "Setting the init for x\n",
      "Settiing the init for u\n",
      "      solver  :   t_proc      (avg)   t_wall      (avg)    n_eval\n",
      "       nlp_f  |  57.00us ( 19.00us)  51.29us ( 17.10us)         3\n",
      "       nlp_g  |   5.93ms (  1.98ms)   5.93ms (  1.98ms)         3\n",
      "  nlp_grad_f  | 117.00us ( 29.25us) 117.38us ( 29.35us)         4\n",
      "  nlp_hess_l  |   1.59 s (796.23ms)   1.59 s (796.20ms)         2\n",
      "   nlp_jac_g  | 150.64ms ( 37.66ms) 150.70ms ( 37.67ms)         4\n",
      "       total  |   1.75 s (  1.75 s)   1.75 s (  1.75 s)         1\n",
      "{'iter_count': 2, 'iterations': {'alpha_du': [0.0, 1.0, 0.9417606551296002], 'alpha_pr': [0.0, 1.0, 1.0], 'd_norm': [0.0, 0.02901749635262268, 0.17777706341881203], 'inf_du': [0.004492368668619497, 0.0002050138988063388, 0.0027042163567237085], 'inf_pr': [0.00012510066536908226, 5.756631231257359e-06, 0.00010626015753301132], 'mu': [0.1, 0.1, 0.002828427124746191], 'obj': [83.88585555842093, 83.88185865472131, 83.87901091818726], 'regularization_size': [0.0, 0.0, 0.0]}, 'n_call_callback_fun': 0, 'n_call_nlp_f': 3, 'n_call_nlp_g': 3, 'n_call_nlp_grad': 0, 'n_call_nlp_grad_f': 4, 'n_call_nlp_hess_l': 2, 'n_call_nlp_jac_g': 4, 'n_call_total': 1, 'return_status': 'Maximum_Iterations_Exceeded', 'success': False, 't_proc_callback_fun': 0.0, 't_proc_nlp_f': 5.7e-05, 't_proc_nlp_g': 0.0059299999999999995, 't_proc_nlp_grad': 0.0, 't_proc_nlp_grad_f': 0.000117, 't_proc_nlp_hess_l': 1.592454, 't_proc_nlp_jac_g': 0.150644, 't_proc_total': 1.753387, 't_wall_callback_fun': 0.0, 't_wall_nlp_f': 5.1290000000000005e-05, 't_wall_nlp_g': 0.005932242, 't_wall_nlp_grad': 0.0, 't_wall_nlp_grad_f': 0.000117383, 't_wall_nlp_hess_l': 1.592401991, 't_wall_nlp_jac_g': 0.150695903, 't_wall_total': 1.753302604, 'unified_return_status': 'SOLVER_RET_LIMITED'}\n",
      "Solver fails under iter 2 return last iteration results!\n",
      "Setting the init for x\n",
      "Settiing the init for u\n",
      "      solver  :   t_proc      (avg)   t_wall      (avg)    n_eval\n",
      "       nlp_f  |  50.00us ( 16.67us)  45.72us ( 15.24us)         3\n",
      "       nlp_g  |   5.51ms (  1.84ms)   5.52ms (  1.84ms)         3\n",
      "  nlp_grad_f  |  97.00us ( 24.25us)  97.56us ( 24.39us)         4\n",
      "  nlp_hess_l  |   1.53 s (764.60ms)   1.53 s (764.62ms)         2\n",
      "   nlp_jac_g  | 144.98ms ( 36.25ms) 145.02ms ( 36.26ms)         4\n",
      "       total  |   1.68 s (  1.68 s)   1.68 s (  1.68 s)         1\n",
      "{'iter_count': 2, 'iterations': {'alpha_du': [0.0, 1.0, 0.9469265146642802], 'alpha_pr': [0.0, 1.0, 1.0], 'd_norm': [0.0, 0.02872299114143712, 0.16750391104828083], 'inf_du': [0.004337894414927242, 0.0002056101456779924, 0.002415276933673806], 'inf_pr': [0.00010626015753301132, 5.289691961563037e-06, 9.228537975380924e-05], 'mu': [0.1, 0.1, 0.002828427124746191], 'obj': [83.77994453647182, 83.7761961673675, 83.77356709973043], 'regularization_size': [0.0, 0.0, 0.0]}, 'n_call_callback_fun': 0, 'n_call_nlp_f': 3, 'n_call_nlp_g': 3, 'n_call_nlp_grad': 0, 'n_call_nlp_grad_f': 4, 'n_call_nlp_hess_l': 2, 'n_call_nlp_jac_g': 4, 'n_call_total': 1, 'return_status': 'Maximum_Iterations_Exceeded', 'success': False, 't_proc_callback_fun': 0.0, 't_proc_nlp_f': 5e-05, 't_proc_nlp_g': 0.005515, 't_proc_nlp_grad': 0.0, 't_proc_nlp_grad_f': 9.700000000000001e-05, 't_proc_nlp_hess_l': 1.5292059999999998, 't_proc_nlp_jac_g': 0.144981, 't_proc_total': 1.683706, 't_wall_callback_fun': 0.0, 't_wall_nlp_f': 4.5722999999999996e-05, 't_wall_nlp_g': 0.0055152940000000004, 't_wall_nlp_grad': 0.0, 't_wall_nlp_grad_f': 9.7557e-05, 't_wall_nlp_hess_l': 1.5292483, 't_wall_nlp_jac_g': 0.145023214, 't_wall_total': 1.683739651, 'unified_return_status': 'SOLVER_RET_LIMITED'}\n",
      "Solver fails under iter 2 return last iteration results!\n",
      "Setting the init for x\n",
      "Settiing the init for u\n",
      "      solver  :   t_proc      (avg)   t_wall      (avg)    n_eval\n",
      "       nlp_f  |  54.00us ( 18.00us)  50.14us ( 16.71us)         3\n",
      "       nlp_g  |   5.65ms (  1.88ms)   5.66ms (  1.89ms)         3\n",
      "  nlp_grad_f  | 108.00us ( 27.00us) 107.64us ( 26.91us)         4\n",
      "  nlp_hess_l  |   1.57 s (783.97ms)   1.57 s (783.98ms)         2\n",
      "   nlp_jac_g  | 146.96ms ( 36.74ms) 147.00ms ( 36.75ms)         4\n",
      "       total  |   1.72 s (  1.72 s)   1.72 s (  1.72 s)         1\n",
      "{'iter_count': 2, 'iterations': {'alpha_du': [0.0, 1.0, 0.9523019712976083], 'alpha_pr': [0.0, 1.0, 1.0], 'd_norm': [0.0, 0.02830010755295061, 0.1585348316334428], 'inf_du': [0.004187533641109605, 0.00019358575308892068, 0.0021181977385193243], 'inf_pr': [9.228537975380924e-05, 4.768808173238881e-06, 8.154801981830051e-05], 'mu': [0.1, 0.1, 0.002828427124746191], 'obj': [83.66221216293269, 83.65868286456258, 83.65621467089], 'regularization_size': [0.0, 0.0, 0.0]}, 'n_call_callback_fun': 0, 'n_call_nlp_f': 3, 'n_call_nlp_g': 3, 'n_call_nlp_grad': 0, 'n_call_nlp_grad_f': 4, 'n_call_nlp_hess_l': 2, 'n_call_nlp_jac_g': 4, 'n_call_total': 1, 'return_status': 'Maximum_Iterations_Exceeded', 'success': False, 't_proc_callback_fun': 0.0, 't_proc_nlp_f': 5.4e-05, 't_proc_nlp_g': 0.005652, 't_proc_nlp_grad': 0.0, 't_proc_nlp_grad_f': 0.000108, 't_proc_nlp_hess_l': 1.567936, 't_proc_nlp_jac_g': 0.146955, 't_proc_total': 1.724697, 't_wall_callback_fun': 0.0, 't_wall_nlp_f': 5.0139e-05, 't_wall_nlp_g': 0.005655427, 't_wall_nlp_grad': 0.0, 't_wall_nlp_grad_f': 0.00010763800000000002, 't_wall_nlp_hess_l': 1.567952747, 't_wall_nlp_jac_g': 0.14700256499999997, 't_wall_total': 1.724696703, 'unified_return_status': 'SOLVER_RET_LIMITED'}\n",
      "Solver fails under iter 2 return last iteration results!\n",
      "Setting the init for x\n",
      "Settiing the init for u\n",
      "      solver  :   t_proc      (avg)   t_wall      (avg)    n_eval\n",
      "       nlp_f  |  57.00us ( 19.00us)  52.58us ( 17.53us)         3\n",
      "       nlp_g  |   5.66ms (  1.89ms)   5.66ms (  1.89ms)         3\n",
      "  nlp_grad_f  | 114.00us ( 28.50us) 113.53us ( 28.38us)         4\n",
      "  nlp_hess_l  |   1.56 s (781.52ms)   1.56 s (781.49ms)         2\n",
      "   nlp_jac_g  | 151.69ms ( 37.92ms) 151.74ms ( 37.93ms)         4\n",
      "       total  |   1.72 s (  1.72 s)   1.72 s (  1.72 s)         1\n",
      "{'iter_count': 2, 'iterations': {'alpha_du': [0.0, 1.0, 0.9571452162224894], 'alpha_pr': [0.0, 1.0, 1.0], 'd_norm': [0.0, 0.027828063077298935, 0.15155500196752836], 'inf_du': [0.004042661017898906, 0.00017438224642085665, 0.0018547727560283764], 'inf_pr': [8.154801981830051e-05, 4.261650143333462e-06, 7.385267980430932e-05], 'mu': [0.1, 0.1, 0.002828427124746191], 'obj': [83.53485476863636, 83.53152049466088, 83.52915969396096], 'regularization_size': [0.0, 0.0, 0.0]}, 'n_call_callback_fun': 0, 'n_call_nlp_f': 3, 'n_call_nlp_g': 3, 'n_call_nlp_grad': 0, 'n_call_nlp_grad_f': 4, 'n_call_nlp_hess_l': 2, 'n_call_nlp_jac_g': 4, 'n_call_total': 1, 'return_status': 'Maximum_Iterations_Exceeded', 'success': False, 't_proc_callback_fun': 0.0, 't_proc_nlp_f': 5.7e-05, 't_proc_nlp_g': 0.005656, 't_proc_nlp_grad': 0.0, 't_proc_nlp_grad_f': 0.000114, 't_proc_nlp_hess_l': 1.563046, 't_proc_nlp_jac_g': 0.151691, 't_proc_total': 1.724673, 't_wall_callback_fun': 0.0, 't_wall_nlp_f': 5.2575000000000004e-05, 't_wall_nlp_g': 0.005657351, 't_wall_nlp_grad': 0.0, 't_wall_nlp_grad_f': 0.00011352899999999999, 't_wall_nlp_hess_l': 1.5629886069999999, 't_wall_nlp_jac_g': 0.151737004, 't_wall_total': 1.724591337, 'unified_return_status': 'SOLVER_RET_LIMITED'}\n",
      "Solver fails under iter 2 return last iteration results!\n"
     ]
    },
    {
     "data": {
      "text/html": [
       "<table class=\"show_videos\" style=\"border-spacing:0px;\"><tr><td style=\"padding:1px;\"><video controls width=\"320\" height=\"240\" style=\"object-fit:cover;\" loop autoplay muted>\n",
       "      <source src=\"data:video/mp4;base64,AAAAIGZ0eXBpc29tAAACAGlzb21pc28yYXZjMW1wNDEAAAAIZnJlZQAAGGJtZGF0AAACfwYF//973EXpvebZSLeWLNgg2SPu73gyNjQgLSBjb3JlIDE2MyByMzA2MCA1ZGI2YWE2IC0gSC4yNjQvTVBFRy00IEFWQyBjb2RlYyAtIENvcHlsZWZ0IDIwMDMtMjAyMSAtIGh0dHA6Ly93d3cudmlkZW9sYW4ub3JnL3gyNjQuaHRtbCAtIG9wdGlvbnM6IGNhY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TAw\" type=\"video/mp4\"/>\n",
       "      This browser does not support the video tag.\n",
       "      </video></td></tr></table>"
      ],
      "text/plain": [
       "<IPython.core.display.HTML object>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "T = 50\n",
    "\n",
    "x0 = np.array([0, np.pi, 0, 0])\n",
    "\n",
    "# obtain the first result\n",
    "res = solve_mpc_sub_loop(x0=x0, cost_fn=cost_fn, T=50)\n",
    "\n",
    "frames = []\n",
    "# mpc loop\n",
    "for i in range(100):\n",
    "    # execute the first control at solution\n",
    "    x0 = mujoco_dyanmics(x0, res[\"u\"][0]).full().flatten()\n",
    "\n",
    "    # update initial guess\n",
    "    initial_guess = update_init_guess(res)\n",
    "    # solving sub-prob for new initial condition\n",
    "    res = solve_mpc_sub_loop(x0=x0, cost_fn=cost_fn, init_guess=initial_guess, T=50, max_iter=2)\n",
    "\n",
    "    # visualization\n",
    "    data.qpos = x0[:2]\n",
    "    data.qvel = x0[2:]\n",
    "    mujoco.mj_forward(model, data)\n",
    "    renderer.update_scene(data)\n",
    "    pixels = renderer.render()\n",
    "    frames.append(pixels)\n",
    "\n",
    "media.show_video(frames, fps=1/0.02)"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "dpo",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.10.15"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
